PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.10.3
Independent Analytics – WordPress Analytics Plugin v2.10.3
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / IAWP / Plugin_Conflict_Detector.php
independent-analytics / IAWP Last commit date
AJAX 1 year ago Admin_Page 1 year ago Click_Tracking 1 year ago Custom_WordPress_Columns 2 years ago Data_Pruning 1 year ago Date_Picker 1 year ago Date_Range 1 year ago Ecommerce 1 year ago Email_Reports 1 year ago Filter_Lists 1 year ago Form_Submissions 1 year ago Interval 1 year ago Menu_Bar_Stats 1 year ago Migrations 1 year ago Models 1 year ago Public_API 1 year ago Rows 1 year ago Statistics 1 year ago Tables 1 year ago Utils 1 year ago Campaign_Builder.php 1 year ago Capability_Manager.php 1 year ago Chart.php 1 year ago Chart_Geo.php 1 year ago Click_Tracking.php 1 year ago Cron_Job.php 1 year ago Cron_Manager.php 1 year ago Current_Traffic_Finder.php 1 year ago Dashboard_Options.php 1 year ago Dashboard_Widget.php 2 years ago Database.php 1 year ago Database_Manager.php 2 years ago Empty_Report_Option.php 2 years ago Env.php 1 year ago Filters.php 1 year ago Geo_Database_Background_Job.php 2 years ago Geo_Database_Manager.php 1 year ago Geoposition.php 2 years ago Icon_Directory.php 2 years ago Icon_Directory_Factory.php 2 years ago Illuminate_Builder.php 1 year ago Independent_Analytics.php 1 year ago Interrupt.php 1 year ago Known_Referrers.php 2 years ago MainWP.php 1 year ago Patch.php 1 year ago Payload_Validator.php 1 year ago Plugin_Conflict_Detector.php 1 year ago Plugin_Group.php 1 year ago Plugin_Group_Option.php 2 years ago Query.php 1 year ago Query_Taps.php 1 year ago Quick_Stats.php 1 year ago REST_API.php 1 year ago Real_Time.php 1 year ago Report.php 1 year ago Report_Finder.php 1 year ago Report_Options_Parser.php 2 years ago Resource_Identifier.php 1 year ago Settings.php 1 year ago Sort_Configuration.php 1 year ago Tables.php 1 year ago Track_Resource_Changes.php 1 year ago View.php 1 year ago View_Counter.php 1 year ago Views_Over_Time_Finder.php 1 year ago WP_Option_Cache_Bust.php 2 years ago
Plugin_Conflict_Detector.php
168 lines
1 <?php
2
3 namespace IAWP;
4
5 /** @internal */
6 class Plugin_Conflict_Detector
7 {
8 private $error;
9 public function __construct()
10 {
11 $this->error = $this->run_conflict_check();
12 }
13 /**
14 * Did the health check pass?
15 *
16 * @return bool
17 */
18 public function has_conflict() : bool
19 {
20 return !empty($this->error);
21 }
22 /**
23 * Returns the health check error, if any
24 *
25 * @return string|null
26 */
27 public function get_error() : ?string
28 {
29 return $this->error;
30 }
31 public function plugin_requiring_logged_in_tracking()
32 {
33 if (\is_plugin_active('woocommerce/woocommerce.php')) {
34 return 'WooCommerce';
35 } elseif (\is_plugin_active('surecart/surecart.php')) {
36 return 'SureCart';
37 } elseif (\is_plugin_active('paid-memberships-pro/paid-memberships-pro.php')) {
38 return 'Paid Memberships Pro';
39 } elseif (\is_plugin_active('ultimate-member/ultimate-member.php')) {
40 return 'Ultimate Member';
41 } elseif (\is_plugin_active('simple-membership/simple-wp-membership.php')) {
42 return 'Simple WordPress Membership';
43 } elseif (\is_plugin_active('members/members.php')) {
44 return 'Members plugin';
45 }
46 return \false;
47 }
48 /**
49 * @return string|null Returns a string error message if the health check fails
50 */
51 private function run_conflict_check() : ?string
52 {
53 if (\is_plugin_active('disable-wp-rest-api/disable-wp-rest-api.php')) {
54 return \__('The "Disable WP REST API" plugin needs to be deactivated because Independent Analytics uses the REST API to record visits.', 'independent-analytics');
55 }
56 if (\is_plugin_active('all-in-one-wp-security-and-firewall/wp-security.php')) {
57 $settings = \get_option('aio_wp_security_configs', []);
58 if (\array_key_exists('aiowps_disallow_unauthorized_rest_requests', $settings)) {
59 if ($settings['aiowps_disallow_unauthorized_rest_requests'] == 1) {
60 return \__('The "All In One WP Security" plugin is blocking REST API requests, which Independent Analytics needs to record views. Please disable this setting via the WP Security > Miscellaneous menu.', 'independent-analytics');
61 }
62 }
63 }
64 if (\is_plugin_active('disable-json-api/disable-json-api.php')) {
65 $settings = \get_option('disable_rest_api_options', []);
66 if (\array_key_exists('roles', $settings)) {
67 if ($settings['roles']['none']['default_allow'] == \false) {
68 if ($settings['roles']['none']['allow_list']['/iawp/search'] == \false) {
69 return \__('The "Disable REST API" plugin is blocking REST API requests for unauthenticated users, which Independent Analytics needs to record views. Please enable the /iawp/search route, so Independent Analytics can track your visitors.', 'independent-analytics');
70 }
71 }
72 }
73 }
74 if (\is_plugin_active('disable-xml-rpc-api/disable-xml-rpc-api.php')) {
75 $settings = \get_option('dsxmlrpc-settings');
76 if (\array_key_exists('json-rest-api', $settings)) {
77 if ($settings['json-rest-api'] == 1) {
78 return \__('The "Disable XML-RPC-API" plugin is blocking REST API requests, which Independent Analytics needs to record views. Please visit the Security Settings menu and turn off the "Disable JSON REST API" option, so Independent Analytics can track your visitors.', 'independent-analytics');
79 }
80 }
81 }
82 if (\is_plugin_active('wpo-tweaks/wordpress-wpo-tweaks.php')) {
83 return \__('The "WPO Tweaks & Optimizations" plugin needs to be deactivated because it is disabling the REST API, which Independent Analytics uses to record visits.', 'independent-analytics');
84 }
85 if (\is_plugin_active('all-in-one-intranet/basic_all_in_one_intranet.php')) {
86 return \__('The "All-In-One Intranet" plugin needs to be deactivated because it is disabling the REST API, which Independent Analytics uses to record visits. You may want to try the "My Private Site" plugin instead.', 'independent-analytics');
87 }
88 if (\is_plugin_active('wp-security-hardening/wp-hardening.php')) {
89 $settings = \get_option('whp_fixer_option');
90 if (\array_key_exists('disable_json_api', $settings)) {
91 if ($settings['disable_json_api'] != 'off') {
92 return \__('The "WP Hardening" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the WP Hardening > Security Fixers menu and turn off the "Disable WP API JSON" option, so Independent Analytics can track your visitors.', 'independent-analytics');
93 }
94 }
95 }
96 if (\is_plugin_active('wp-rest-api-authentication/miniorange-api-authentication.php')) {
97 $settings = \get_option('mo_api_authentication_protectedrestapi_route_whitelist');
98 if (\in_array('/iawp/search', $settings)) {
99 return \__('The "WordPress REST API Authentication" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the miniOrange API Authentication > Protected REST APIs menu and uncheck the "/iawp/search" box to allow Independent Analytics to track your visitors.', 'independent-analytics');
100 }
101 }
102 if (\is_plugin_active('ninjafirewall/ninjafirewall.php')) {
103 $settings = \get_option('nfw_options');
104 if (\array_key_exists('no_restapi', $settings)) {
105 if ($settings['no_restapi'] == 1) {
106 return \__('The "NinjaFirewall" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the NinjaFirewall > Firewall Policies menu and uncheck the "Block any access to the API" checkbox to allow Independent Analytics to track your visitors.', 'independent-analytics');
107 }
108 }
109 }
110 if (\is_plugin_active('wp-cerber/wp-cerber.php')) {
111 // This option has been renamed before. If there's an issue in here, check that it wasn't renamed again.
112 $settings = \get_option('cerber_configuration');
113 if ($settings === \false) {
114 $settings = \get_option('cerber-hardening');
115 }
116 if (\array_key_exists('norest', $settings)) {
117 if ($settings['norest'] === '1') {
118 if (!\in_array('iawp', $settings['restwhite'])) {
119 return \__('The "WP Cerber" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the WP Cerber > Dashboard > Hardening menu and add "iawp" to your allowed namespaces. This will keep the REST API locked down while allowing requests for Independent Analytics.', 'independent-analytics');
120 }
121 }
122 }
123 }
124 if (\is_plugin_active('wp-simple-firewall/icwp-wpsf.php')) {
125 // This option has been renamed before. If there's an issue in here, check that it wasn't renamed again.
126 $settings = \get_option('icwp_wpsf_opts_all');
127 if ($settings === \false) {
128 $settings = \get_option('icwp_wpsf_opts_free');
129 }
130 if (\array_key_exists('lockdown', $settings)) {
131 if (\array_key_exists('disable_anonymous_restapi', $settings['lockdown'])) {
132 if ($settings['lockdown']['disable_anonymous_restapi'] == 'Y') {
133 if (\array_key_exists('api_namespace_exclusions', $settings['lockdown'])) {
134 if (!\in_array('iawp', $settings['lockdown']['api_namespace_exclusions'])) {
135 return \__('The "Shield Security" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the Shield Security > Config > Lockdown menu and add "iawp" to your allowed namespaces. This will keep the REST API locked down while allowing requests for Independent Analytics.', 'independent-analytics');
136 }
137 }
138 }
139 }
140 }
141 }
142 if (\is_plugin_active('wp-hide-security-enhancer/wp-hide.php')) {
143 $settings = \get_option('wph_settings');
144 if (\array_key_exists('module_settings', $settings)) {
145 if (\array_key_exists('disable_json_rest_v2', $settings['module_settings'])) {
146 if ($settings['module_settings']['disable_json_rest_v2'] == 'yes') {
147 return \__('The "WP Hide" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the WP Hide > Rewrite URLs menu and switch the "Disable JSON REST V2 service" option to "No."', 'independent-analytics');
148 }
149 }
150 if (\array_key_exists('block_json_rest', $settings['module_settings'])) {
151 if ($settings['module_settings']['block_json_rest'] == 'yes' || $settings['module_settings']['block_json_rest'] == 'non-logged-in') {
152 return \__('The "WP Hide" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the WP Hide > Rewrite URLs menu and switch the "Block any JSON REST calls" option to "No."', 'independent-analytics');
153 }
154 }
155 }
156 }
157 if (\is_plugin_active('admin-site-enhancements/admin-site-enhancements.php') || \is_plugin_active('admin-site-enhancements-pro/admin-site-enhancements.php')) {
158 $settings = \get_option('admin_site_enhancements');
159 if (\array_key_exists('disable_rest_api', $settings)) {
160 if ($settings['disable_rest_api']) {
161 return \__('The "Admin and Site Enhancements" plugin is blocking the REST API, which Independent Analytics needs to record views. Please visit the Tools > Enhancements menu, click on the "Disable Components" section, and deselect the "Disable REST API" setting to allow Independent Analytics to track your visitors.', 'independent-analytics');
162 }
163 }
164 }
165 return null;
166 }
167 }
168