( \wp_login_url() === \site_url( 'wp-login.php', 'login' ) ), ); // Check if using default login URL. $is_default = ( strpos( $login_url, $default_path ) !== false ); // Check for common login protection plugins. $protection_plugins = array( 'wps-hide-login/wps-hide-login.php', 'rename-wp-login/rename-wp-login.php', 'lockdown-wp-admin/lockdown-wp-admin.php', 'all-in-one-wp-security-and-firewall/wp-security.php', 'wordfence/wordfence.php', 'ithemes-security-pro/ithemes-security-pro.php', 'better-wp-security/better-wp-security.php', ); $has_protection = false; foreach ( $protection_plugins as $plugin ) { if ( Plugin_Theme_Helper::is_plugin_active( $plugin ) ) { $has_protection = true; break; } } $details['has_security_plugin'] = $has_protection; if ( $has_protection ) { return static::pass( __( 'You have a security plugin installed that can protect your login page from brute force attacks.', '0-day-analytics' ), $details ); } if ( $is_default ) { return static::warning( __( 'Your login page uses the default WordPress URL (wp-login.php). Bots constantly scan for this URL to attempt login attacks.', '0-day-analytics' ), __( 'Consider installing a security plugin like Wordfence or WPS Hide Login to add brute force protection or change your login URL.', '0-day-analytics' ), $details ); } return static::pass( __( 'Your login page appears to use a custom URL, which adds a layer of protection against automated attacks.', '0-day-analytics' ), $details ); } } }