Issues (52)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

include/Deprecated/class-bd-addon.php (3 issues)

Labels
1
<?php
2
/**
3
 * Base class for all BD Addons.
4
 *
5
 * @since   5.5
6
 * @deprecated 6.0.0 Use \BulkWP\BulkDelete\Core\Addon\BaseAddon instead.
7
 *
8
 * @author  Sudar
9
 *
10
 * @package BulkDelete\Addons\Base
11
 */
12
defined( 'ABSPATH' ) || exit; // Exit if accessed directly
13
14
/**
15
 * Base class for BD Addons.
16
 *
17
 * @abstract
18
 *
19
 * @since 5.5
20
 */
21
abstract class BD_Addon {
22
	/**
23
	 * @var string Addon Name.
24
	 */
25
	protected $addon_name;
26
27
	/**
28
	 * @var string Addon Code.
29
	 */
30
	protected $addon_code;
31
32
	/**
33
	 * @var string Addon File.
34
	 */
35
	protected $addon_file;
36
37
	/**
38
	 * @var string Addon Version.
39
	 */
40
	protected $addon_version;
41
42
	/**
43
	 * @var string Addon Author.
44
	 */
45
	protected $addon_author = 'Sudar Muthu';
46
47
	/**
48
	 * @var Module Name.
0 ignored issues
show
The type Module was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
49
	 */
50
	protected $module;
51
52
	/**
53
	 * @var object License Handler.
54
	 */
55
	protected $license_handler;
56
57
	/**
58
	 * Initialize and setup variables.
59
	 *
60
	 * @since 5.5
61
	 * @abstract
62
	 *
63
	 * @return void
64
	 */
65
	abstract protected function initialize();
66
67
	/**
68
	 * Use `factory()` method to create instance of this class.
69
	 * Don't create instances directly.
70
	 *
71
	 * @since 5.5
72
	 * @see factory()
73
	 */
74
	public function __construct() {
75
		$this->setup();
76
	}
77
78
	/**
79
	 * Setup the module.
80
	 *
81
	 * @access protected
82
	 *
83
	 * @since 5.5
84
	 */
85
	protected function setup() {
86
		$this->initialize();
87
		$this->setup_translation();
88
		if ( $this->dependencies_met() ) {
89
			$this->setup_hooks();
0 ignored issues
show
The method setup_hooks() does not exist on BD_Addon. Did you maybe mean setup()? ( Ignorable by Annotation )

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

89
			$this->/** @scrutinizer ignore-call */ 
90
          setup_hooks();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
90
		}
91
	}
92
93
	/**
94
	 * Check if all dependencies are met.
95
	 * To check for dependencies overload this method in the child class.
96
	 *
97
	 * @return bool True if dependencies met, False otherwise.
98
	 */
99
	protected function dependencies_met() {
100
		return true;
101
	}
102
103
	/**
104
	 * Setup translation.
105
	 *
106
	 * @access protected
107
	 *
108
	 * @since 5.5
109
	 */
110
	protected function setup_translation() {
111
		$bd = BULK_DELETE();
112
113
		// Load translation files from Bulk Delete language folder
114
		load_plugin_textdomain( 'bulk-delete', false, $bd->translations );
0 ignored issues
show
false of type false is incompatible with the type string expected by parameter $deprecated of load_plugin_textdomain(). ( Ignorable by Annotation )

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

114
		load_plugin_textdomain( 'bulk-delete', /** @scrutinizer ignore-type */ false, $bd->translations );
Loading history...
115
	}
116
117
	/**
118
	 * Setup license handler.
119
	 *
120
	 * @since 5.5
121
	 *
122
	 * @param string $plugin_file Addon file name relative to plugin directory.
123
	 */
124
	public function setup_license_handler( $plugin_file ) {
125
		$this->addon_file      = $plugin_file;
126
		$this->license_handler = new BD_License_Handler(
127
			$this->addon_name,
128
			$this->addon_code,
129
			$this->addon_version,
130
			$this->addon_file,
131
			$this->addon_author
132
		);
133
	}
134
135
	/**
136
	 * Get addon class name.
137
	 *
138
	 * @since 5.5
139
	 *
140
	 * @return string Addon class name
141
	 */
142
	protected function get_addon_class_name() {
143
		return bd_get_addon_class_name( $this->addon_name );
144
	}
145
}
146