'administrator', 'fields' => array( 'ID', 'user_login' ), ) ); $found_risky = array(); foreach ( $admins as $admin ) { if ( in_array( strtolower( $admin->user_login ), $risky_usernames, true ) ) { $found_risky[] = $admin->user_login; } } $details = array( 'admin_count' => count( $admins ), 'risky_accounts' => $found_risky, ); if ( ! empty( $found_risky ) ) { $usernames = implode( ', ', $found_risky ); return static::fail( 'high', sprintf( /* translators: %s: list of usernames */ __( 'You have administrator accounts with commonly targeted usernames: %s. These are the first usernames hackers try when attempting to break into WordPress sites.', '0-day-analytics' ), $usernames ), __( 'Create a new administrator account with a unique username, then log in with it and delete or demote the risky accounts. Don\'t just change the display name - the login username is what matters.', '0-day-analytics' ), $details ); } return static::pass( __( 'Your administrator accounts use unique usernames that aren\'t commonly targeted by hackers.', '0-day-analytics' ), $details ); } } }