Passed
Push — master ( ae447d...5389c1 )
by Salah
01:31
created

wp-security.php (3 issues)

Labels
Severity
1
<?php
2
/**
3
 * Plugin Name: WordPress Security
4
 * Plugin URI: https://github.com/yemenifree/wp-security
5
 * Description: Basic security helper for WordPress.
6
 * Version: 1.0.0
7
 * Author: Salah Alkhwlani <[email protected]>
8
 * Author URI: https://www.twitter.com/salahAlkhwlani
9
 * Requires at least: 4.7
10
 * Tested up to: 4.8
11
 */
12
13
// Register autoloader for this plugin.
14
require_once __DIR__ . '/vendor/autoload.php';
15
16
define('WC_SECURITY_PATH', __DIR__);
17
18
// Construct plugin instance.
19
$security = new \Yemenifree\WpSecurity\Plugin(plugin_basename(__FILE__));
0 ignored issues
show
The function plugin_basename was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
$security = new \Yemenifree\WpSecurity\Plugin(/** @scrutinizer ignore-call */ plugin_basename(__FILE__));
Loading history...
20
21
// Register activation hook.
22
register_activation_hook(__FILE__, [$security, 'activate']);
0 ignored issues
show
The function register_activation_hook was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
/** @scrutinizer ignore-call */ 
23
register_activation_hook(__FILE__, [$security, 'activate']);
Loading history...
23
// Register deactivation hook.
24
register_deactivation_hook(__FILE__, [$security, 'deactivate']);
0 ignored issues
show
The function register_deactivation_hook was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
/** @scrutinizer ignore-call */ 
25
register_deactivation_hook(__FILE__, [$security, 'deactivate']);
Loading history...
25
// Ideally, uninstall hook would be registered here, but WordPress allows only static method in uninstall hook...
26
27
// Load the plugin.
28
$security->load();
29