# wpvulnerability/5.1.2/wpvulnerability.php

WPVulnerability, version 5.1.2. 156 lines.

- Page: https://pluginprobe.com/plugins/wpvulnerability/5.1.2/code/wpvulnerability.php
- Raw: https://pluginprobe.com/plugins/wpvulnerability/5.1.2/raw/wpvulnerability.php
- Modified: 2026-08-07T10:49:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpvulnerability/5.1.2/code/wpvulnerability.php#L10-L20`.

```php
<?php
/**
 * Plugin Name: WPVulnerability
 * Plugin URI: https://www.wpvulnerability.com/plugin/
 * Description: Receive information about possible vulnerabilities in your WordPress from WordPress Vulnerability Database API.
 * Requires at least: 5.6
 * Requires PHP: 7.0
 * Version: 5.1.2
 * Author: ROBOTSTXT
 * Author URI: https://www.robotstxt.es/
 * License: GPL-3.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
 * Text Domain: wpvulnerability
 * Domain Path: /languages
 * Network: true
 *
 * @package WPVulnerability
 *
 * @version 5.1.2
 */

defined( 'ABSPATH' ) || die( 'No script kiddies please!' );

/**
 * Set some constants that I can change in future versions.
 */
define( 'WPVULNERABILITY_PLUGIN_VERSION', '5.1.2' );
define( 'WPVULNERABILITY_API_HOST', 'https://www.wpvulnerability.net/' );

/**
 * Set some useful constants.
 */
define( 'WPVULNERABILITY_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
define( 'WPVULNERABILITY_PLUGIN_FILE', __FILE__ );
define( 'WPVULNERABILITY_PLUGIN_BASE', plugin_basename( __FILE__ ) );
define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );

// Handle front-end email opt-out requests early.
if ( isset( $_GET['wpvulnerability_disable_email'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
	// Load pluggable functions so wp_verify_nonce() is available.
	if ( ! function_exists( 'wp_verify_nonce' ) ) {
		require_once ABSPATH . WPINC . '/pluggable.php';
	}

	if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) {
		if ( ! function_exists( 'wp_cookie_constants' ) ) {
			require_once ABSPATH . WPINC . '/default-constants.php';
		}

		if ( function_exists( 'wp_cookie_constants' ) ) {
			wp_cookie_constants();
		}
	}

	if ( ! function_exists( 'wpvulnerability_normalize_notify_settings' ) ) {
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php';
	}

	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php';

	if ( function_exists( 'wpvulnerability_disable_notifications_via_url' ) ) {
		wpvulnerability_disable_notifications_via_url();
	}
}

/**
 * Initialize the plugin.
 *
 * @since 2.0.0
 *
 * @return void
 */
function wpvulnerability_plugin_init() {
	wpvulnerability_initialize_plugin_data();

	/*
	 * Global functions, where the magic happens.
	 *
	 * @since 2.0.0
	 */
	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php';

	/*
	 * The admin panel for the configuration.
	 *
	 * @since 2.0.0
	 */
	if ( is_multisite() && ( is_network_admin() || ( wp_doing_ajax() && is_admin() ) ) ) {
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-adminms.php';
	} elseif ( ! is_multisite() && is_admin() ) {
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-admin.php';
	}

	/*
	 * The functions to work with the data.
	 *
	 * @since 2.0.0
	 */
	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-core.php';
	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-plugins.php';
	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-themes.php';
	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-software.php';

	/*
	 * All the plugin really does.
	 *
	 * @since 2.0.0
	 */
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-process.php';
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php';
		require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-sitehealth.php';
		require_once WPVULNERABILITY_PLUGIN_PATH . '/class-wpvulnerability-cli.php';
		require_once WPVULNERABILITY_PLUGIN_PATH . '/class-wpvulnerability-config-cli.php';
}

/*
 * Only load if it's admin / super admin.
 */
if (
				( ! is_multisite() && is_admin() ) ||
		( is_multisite() && ( is_network_admin() || is_main_site() ) ) ||
		( defined( 'WP_CLI' ) && WP_CLI ) || // @phpstan-ignore booleanAnd.rightAlwaysFalse (WP_CLI is false in bootstrap but true at runtime)
		( wp_doing_cron() && ( ! is_multisite() || is_main_site() ) ) // Cron events only run on the main site (see wpvulnerability-schedule.php); skip full module loading on subsite cron.
	) {

	require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-run.php';
	register_activation_hook( WPVULNERABILITY_PLUGIN_FILE, 'wpvulnerability_activation' );
	register_deactivation_hook( WPVULNERABILITY_PLUGIN_FILE, 'wpvulnerability_deactivation' );
	register_uninstall_hook( WPVULNERABILITY_PLUGIN_FILE, 'wpvulnerability_uninstall' );
	add_action( 'init', 'wpvulnerability_plugin_init' );
}

/*
 * The plugin really needs this.
 *
 * @since 3.1.0
 */
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-schedule.php';
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-api.php';

/**
 * Load plugin translations on init.
 *
 * Explicitly loading the textdomain on init prevents the
 * "_load_textdomain_just_in_time() was called incorrectly" notice
 * on WordPress 6.7+.
 *
 * @since 5.1.2
 *
 * @return void
 */
function wpvulnerability_load_textdomain() {
	load_plugin_textdomain( 'wpvulnerability', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
add_action( 'init', 'wpvulnerability_load_textdomain' );

```
