Passed
Push — master ( 59650c...0b7aa3 )
by Chris
11:04 queued 06:15
created

MonsterInsights_WP_Site_Health_Lite   C

Complexity

Total Complexity 56

Size/Duplication

Total Lines 494
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 222
c 1
b 0
f 0
dl 0
loc 494
rs 5.5199
wmc 56

15 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A add_tests() 0 46 5
A uses_fbia() 0 3 3
A is_tracking() 0 8 2
A uses_amp() 0 3 2
B is_ecommerce() 0 19 8
A test_check_tracking_code() 0 28 5
A test_check_ecommerce() 0 19 1
A test_check_authentication() 0 45 4
A test_check_license() 0 19 1
A test_check_autoupdates() 0 31 3
A test_check_fbia() 0 19 1
C is_coming_soon_active() 0 67 14
A test_check_amp() 0 19 1
A test_check_connection() 0 34 5

How to fix   Complexity   

Complex Class

Complex classes like MonsterInsights_WP_Site_Health_Lite often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use MonsterInsights_WP_Site_Health_Lite, and based on these observations, apply Extract Interface, too.

1
<?php
2
/**
3
 * Add MonsterInsights tests to the WP Site Health area.
4
 */
5
6
/**
7
 * Class MonsterInsights_WP_Site_Health_Lite
8
 */
9
class MonsterInsights_WP_Site_Health_Lite {
10
11
	/**
12
	 * Is the site licensed?
13
	 *
14
	 * @var bool
15
	 */
16
	private $is_licensed;
0 ignored issues
show
introduced by
The private property $is_licensed is not used, and could be removed.
Loading history...
17
	/**
18
	 * Is the site autherd?
19
	 *
20
	 * @var bool
21
	 */
22
	private $is_authed;
23
	/**
24
	 * Which eCommerce type, if any.
25
	 *
26
	 * @var bool|string
27
	 */
28
	private $ecommerce;
29
30
	/**
31
	 * MonsterInsights_WP_Site_Health_Lite constructor.
32
	 */
33
	public function __construct() {
34
35
		add_filter( 'site_status_tests', array( $this, 'add_tests' ) );
36
37
		add_action( 'wp_ajax_health-check-monsterinsights-test_connection', array( $this, 'test_check_connection' ) );
38
39
		add_action( 'wp_ajax_health-check-monsterinsights-test_tracking_code', array( $this, 'test_check_tracking_code' ) );
40
41
	}
42
43
	/**
44
	 * Add MonsterInsights WP Site Health tests.
45
	 *
46
	 * @param array $tests The current filters array.
47
	 *
48
	 * @return array
49
	 */
50
	public function add_tests( $tests ) {
51
52
		$tests['direct']['monsterinsights_auth'] = array(
53
			'label' => __( 'MonsterInsights Authentication', 'google-analytics-for-wordpress' ),
54
			'test'  => array( $this, 'test_check_authentication' ),
55
		);
56
57
		$tests['direct']['monsterinsights_automatic_updates'] = array(
58
			'label' => __( 'MonsterInsights Automatic Updates', 'google-analytics-for-wordpress' ),
59
			'test'  => array( $this, 'test_check_autoupdates' ),
60
		);
61
62
		if ( $this->is_ecommerce() ) {
63
			$tests['direct']['monsterinsights_ecommerce'] = array(
64
				'label' => __( 'MonsterInsights eCommerce', 'google-analytics-for-wordpress' ),
65
				'test'  => array( $this, 'test_check_ecommerce' ),
66
			);
67
		}
68
69
		if ( $this->uses_amp() ) {
70
			$tests['direct']['monsterinsights_amp'] = array(
71
				'label' => __( 'MonsterInsights AMP', 'google-analytics-for-wordpress' ),
72
				'test'  => array( $this, 'test_check_amp' ),
73
			);
74
		}
75
76
		if ( $this->uses_fbia() ) {
77
			$tests['direct']['monsterinsights_fbia'] = array(
78
				'label' => __( 'MonsterInsights FBIA', 'google-analytics-for-wordpress' ),
79
				'test'  => array( $this, 'test_check_fbia' ),
80
			);
81
		}
82
83
		$tests['async']['monsterinsights_connection'] = array(
84
			'label' => __( 'MonsterInsights Connection', 'google-analytics-for-wordpress' ),
85
			'test'  => 'monsterinsights_test_connection',
86
		);
87
88
		if ( $this->is_tracking() ) {
89
			$tests['async']['monsterinsights_tracking_code'] = array(
90
				'label' => __( 'MonsterInsights Tracking Code', 'ga-premium' ),
91
				'test'  => 'monsterinsights_test_tracking_code',
92
			);
93
		}
94
95
		return $tests;
96
	}
97
98
	/**
99
	 * Checks if the website is being tracked.
100
	 *
101
	 * @return bool
102
	 */
103
	public function is_tracking() {
104
105
		if ( ! isset( $this->is_tracking ) ) {
106
			$ua                = monsterinsights_get_ua();
107
			$this->is_tracking = ! empty( $ua );
0 ignored issues
show
Bug Best Practice introduced by
The property is_tracking does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
108
		}
109
110
		return $this->is_tracking;
111
112
	}
113
114
	/**
115
	 * Check if any of the supported eCommerce integrations are available.
116
	 *
117
	 * @return bool
118
	 */
119
	public function is_ecommerce() {
120
121
		if ( isset( $this->ecommerce ) ) {
122
			return $this->ecommerce;
123
		}
124
125
		$this->ecommerce = false;
126
127
		if ( class_exists( 'WooCommerce' ) ) {
128
			$this->ecommerce = 'WooCommerce';
129
		} else if ( class_exists( 'Easy_Digital_Downloads' ) ) {
130
			$this->ecommerce = 'Easy Digital Downloads';
131
		} else if ( defined( 'MEPR_VERSION' ) && version_compare( MEPR_VERSION, '1.3.43', '>' ) ) {
0 ignored issues
show
Bug introduced by
The constant MEPR_VERSION was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
132
			$this->ecommerce = 'MemberPress';
133
		} else if ( function_exists( 'LLMS' ) && version_compare( LLMS()->version, '3.32.0', '>=' ) ) {
134
			$this->ecommerce = 'LifterLMS';
135
		}
136
137
		return $this->ecommerce;
138
	}
139
140
	/**
141
	 * Is the site using AMP or has the AMP addon installed?
142
	 *
143
	 * @return bool
144
	 */
145
	public function uses_amp() {
146
147
		return class_exists( 'MonsterInsights_AMP' ) || defined( 'AMP__FILE__' );
148
149
	}
150
151
	/**
152
	 * Is the site using FB Instant Articles or has the FBIA addon installed?
153
	 *
154
	 * @return bool
155
	 */
156
	public function uses_fbia() {
157
158
		return class_exists( 'MonsterInsights_FB_Instant_Articles' ) || defined( 'IA_PLUGIN_VERSION' ) && version_compare( IA_PLUGIN_VERSION, '3.3.4', '>' );
0 ignored issues
show
Bug introduced by
The constant IA_PLUGIN_VERSION was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
159
160
	}
161
162
	/**
163
	 * Is Coming Soon / Maintenance / Under Construction mode being activated by another plugin?
164
	 *
165
	 * @return bool
166
	 */
167
	private function is_coming_soon_active() {
168
		if ( defined( 'SEED_CSP4_SHORTNAME' ) ) {
169
			// SeedProd
170
			// http://www.seedprod.com
171
172
			$settings = get_option( 'seed_csp4_settings_content' );
173
174
			// 0: Disabled
175
			// 1: Coming soon mode
176
			// 2: Maintenance mode
177
			return ! empty( $settings['status'] );
178
		} elseif ( defined( 'WPMM_PATH' ) ) {
179
			// WP Maintenance Mode
180
			// https://designmodo.com/
181
182
			$settings = get_option( 'wpmm_settings', array() );
183
184
			return isset( $settings['general']['status'] ) && 1 === $settings['general']['status'];
185
		} elseif ( function_exists( 'csmm_get_options' ) ) {
186
			// Minimal Coming Soon & Maintenance Mode
187
			// https://comingsoonwp.com/
188
189
			$settings = csmm_get_options();
190
191
			return isset( $settings['status'] ) && 1 === $settings['status'];
192
		} elseif ( defined( 'WPM_DIR' ) ) {
193
			// WP Maintenance
194
			// https://fr.wordpress.org/plugins/wp-maintenance/
195
196
			return '1' === get_option( 'wp_maintenance_active' );
197
		} elseif ( defined( 'ACX_CSMA_CURRENT_VERSION' ) ) {
198
			// Under Construction / Maintenance Mode From Acurax
199
			// http://www.acurax.com/products/under-construction-maintenance-mode-wordpress-plugin
200
201
			return '1' === get_option( 'acx_csma_activation_status' );
202
		} elseif ( defined( 'SAHU_SO_PLUGIN_URL' ) ) {
203
			// Site Offline
204
			// http://www.freehtmldesigns.com
205
206
			$settings = maybe_unserialize( get_option( 'sahu_so_dashboard' ) );
0 ignored issues
show
Bug introduced by
It seems like get_option('sahu_so_dashboard') can also be of type false; however, parameter $original of maybe_unserialize() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

206
			$settings = maybe_unserialize( /** @scrutinizer ignore-type */ get_option( 'sahu_so_dashboard' ) );
Loading history...
207
208
			return isset( $settings['sahu_so_status'] ) && '1' === $settings['sahu_so_status'];
209
		} elseif ( defined( 'CSCS_GENEROPTION_PREFIX' ) ) {
210
			// IgniteUp
211
			// http://getigniteup.com
212
213
			return '1' === get_option( CSCS_GENEROPTION_PREFIX . 'enable', '' );
0 ignored issues
show
Bug introduced by
The constant CSCS_GENEROPTION_PREFIX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
214
		} elseif ( method_exists( 'UCP', 'is_construction_mode_enabled' ) ) {
215
			// Under Construction by WebFactory Ltd
216
			// https://underconstructionpage.com/
217
218
			return UCP::is_construction_mode_enabled( true );
0 ignored issues
show
Bug introduced by
The type UCP 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...
219
		} elseif ( function_exists( 'mtnc_get_plugin_options' ) ) {
220
			// Maintenance by WP Maintenance
221
			// http://wordpress.org/plugins/maintenance/
222
223
			$settings = mtnc_get_plugin_options( true );
224
225
			return 1 === $settings['state'];
226
		} elseif ( class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) {
227
			// CMP Coming Soon & Maintenance
228
			// https://wordpress.org/plugins/cmp-coming-soon-maintenance/
229
230
			return get_option( 'niteoCS_status' );
231
		}
232
233
		return false;
234
	}
235
236
	/**
237
	 * Check if MonsterInsights is authenticated and display a specific message.
238
	 *
239
	 * @return array
240
	 */
241
	public function test_check_authentication() {
242
		$result = array(
243
			'label'       => __( 'Your website is authenticated with MonsterInsights', 'google-analytics-for-wordpress' ),
244
			'status'      => 'good',
245
			'badge'       => array(
246
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
247
				'color' => 'blue',
248
			),
249
			'description' => __( 'MonsterInsights integrates your WordPress website with Google Analytics.', 'google-analytics-for-wordpress' ),
250
			'actions'     => sprintf(
251
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
252
				add_query_arg( 'page', 'monsterinsights_reports', admin_url( 'admin.php' ) ),
253
				__( 'View Reports', 'google-analytics-for-wordpress' )
254
			),
255
			'test'        => 'monsterinsights_auth',
256
		);
257
258
		$this->is_authed = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed();
0 ignored issues
show
Bug Best Practice introduced by
The property $auth is declared protected in MonsterInsights_Lite. Since you implement __get, consider adding a @property or @property-read.
Loading history...
259
260
		if ( ! $this->is_authed ) {
261
			if ( '' !== monsterinsights_get_ua() ) {
262
				// Using Manual UA.
263
				$result['status']      = 'recommended';
264
				$result['label']       = __( 'You are using Manual UA code output', 'google-analytics-for-wordpress' );
265
				$result['description'] = __( 'We highly recommend authenticating with MonsterInsights so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' );
266
				$result['actions']     = sprintf(
267
					'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
268
					add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ),
269
					__( 'Authenticate now', 'google-analytics-for-wordpress' )
270
				);
271
272
			} else {
273
				// Not authed at all.
274
				$result['status']      = 'critical';
275
				$result['label']       = __( 'Please configure your Google Analytics settings', 'google-analytics-for-wordpress' );
276
				$result['description'] = __( 'Your traffic is not being tracked by MonsterInsights at the moment and you are losing data. Authenticate and get access to the reporting area and advanced tracking features.', 'google-analytics-for-wordpress' );
277
				$result['actions']     = sprintf(
278
					'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
279
					add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ),
280
					__( 'Authenticate now', 'google-analytics-for-wordpress' )
281
				);
282
			}
283
		}
284
285
		return $result;
286
	}
287
288
	/**
289
	 * Check if the license is properly set up.
290
	 *
291
	 * @return array
292
	 */
293
	public function test_check_license() {
294
295
		$result = array(
296
			'status'      => 'critical',
297
			'badge'       => array(
298
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
299
				'color' => 'blue',
300
			),
301
			'test'        => 'monsterinsights_license',
302
			'label'       => __( 'MonsterInsights Upgrade not applied', 'google-analytics-for-wordpress' ),
303
			'description' => __( 'A valid license has been added to MonsterInsights but you are still using the Lite version.', 'google-analytics-for-wordpress' ),
304
			'actions'     => sprintf(
305
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
306
				add_query_arg( 'page', 'monsterinsights_settings', admin_url( 'admin.php' ) ),
307
				__( 'Go to License Settings', 'google-analytics-for-wordpress' )
308
			),
309
		);
310
311
		return $result;
312
	}
313
314
	/**
315
	 * Tests that run to check if autoupdates are enabled.
316
	 *
317
	 * @return array
318
	 */
319
	public function test_check_autoupdates() {
320
321
		$result = array(
322
			'label'       => __( 'Your website is receiving automatic updates', 'google-analytics-for-wordpress' ),
323
			'status'      => 'good',
324
			'badge'       => array(
325
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
326
				'color' => 'blue',
327
			),
328
			'description' => __( 'MonsterInsights automatic updates are enabled and you are getting the latest features, bugfixes, and security updates as they are released.', 'google-analytics-for-wordpress' ),
329
			'test'        => 'monsterinsights_automatic_updates',
330
		);
331
332
		$updates_option = monsterinsights_get_option( 'automatic_updates', false );
333
334
		if ( 'minor' === $updates_option ) {
335
			$result['label']       = __( 'Your website is receiving minor updates', 'google-analytics-for-wordpress' );
336
			$result['description'] = __( 'MonsterInsights minor updates are enabled and you are getting the latest bugfixes and security updates, but not major features.', 'google-analytics-for-wordpress' );
337
		}
338
		if ( 'none' === $updates_option ) {
339
			$result['status']      = 'recommended';
340
			$result['label']       = __( 'Automatic updates are disabled', 'google-analytics-for-wordpress' );
341
			$result['description'] = __( 'MonsterInsights automatic updates are disabled. We recommend enabling automatic updates so you can get access to the latest features, bugfixes, and security updates as they are released.', 'google-analytics-for-wordpress' );
342
			$result['actions']     = sprintf(
343
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
344
				add_query_arg( 'page', 'monsterinsights_settings#/advanced', admin_url( 'admin.php' ) ),
345
				__( 'Update Settings', 'google-analytics-for-wordpress' )
346
			);
347
		}
348
349
		return $result;
350
351
	}
352
353
	/**
354
	 * Tests that run to check if eCommerce is present.
355
	 *
356
	 * @return array
357
	 */
358
	public function test_check_ecommerce() {
359
		$result = array(
360
			'label'       => __( 'eCommerce data is not being tracked', 'google-analytics-for-wordpress' ),
361
			'status'      => 'recommended',
362
			'badge'       => array(
363
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
364
				'color' => 'blue',
365
			),
366
			// Translators: The eCommerce store currently active.
367
			'description' => sprintf( __( 'You are using %s but the MonsterInsights eCommerce addon is not active, please Install & Activate it to start tracking eCommerce data.', 'google-analytics-for-wordpress' ), $this->ecommerce ),
368
			'test'        => 'monsterinsights_ecommerce',
369
			'actions'     => sprintf(
370
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
371
				add_query_arg( 'page', 'monsterinsights_settings#/addons', admin_url( 'admin.php' ) ),
372
				__( 'View Addons', 'google-analytics-for-wordpress' )
373
			),
374
		);
375
376
		return $result;
377
	}
378
379
	/**
380
	 * Tests for the AMP cases.
381
	 *
382
	 * @return array
383
	 */
384
	public function test_check_amp() {
385
386
		$result = array(
387
			'label'       => __( 'AMP pages are not being tracked', 'google-analytics-for-wordpress' ),
388
			'status'      => 'recommended',
389
			'badge'       => array(
390
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
391
				'color' => 'blue',
392
			),
393
			'description' => __( 'Your website has Google AMP-enabled pages set up but they are not tracked by Google Analytics at the moment. You need to Install & Activate the MonsterInsights AMP Addon.', 'google-analytics-for-wordpress' ),
394
			'test'        => 'monsterinsights_amp',
395
			'actions'     => sprintf(
396
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
397
				add_query_arg( 'page', 'monsterinsights_settings#/addons', admin_url( 'admin.php' ) ),
398
				__( 'View Addons', 'google-analytics-for-wordpress' )
399
			),
400
		);
401
402
		return $result;
403
404
	}
405
406
	/**
407
	 * Tests for the FBIA cases.
408
	 *
409
	 * @return array
410
	 */
411
	public function test_check_fbia() {
412
413
		$result = array(
414
			'label'       => __( 'Facebook Instant Articles pages are not being tracked', 'google-analytics-for-wordpress' ),
415
			'status'      => 'recommended',
416
			'badge'       => array(
417
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
418
				'color' => 'blue',
419
			),
420
			'description' => __( 'Your website has Facebook Instant Articles pages set up but they are not tracked by Google Analytics at the moment. You need to Install & Activate the MonsterInsights Facebook Instant Articles Addon.', 'google-analytics-for-wordpress' ),
421
			'test'        => 'monsterinsights_fbia',
422
			'actions'     => sprintf(
423
				'<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>',
424
				add_query_arg( 'page', 'monsterinsights_settings#/addons', admin_url( 'admin.php' ) ),
425
				__( 'View Addons', 'google-analytics-for-wordpress' )
426
			),
427
		);
428
429
		return $result;
430
431
	}
432
433
	/**
434
	 * Checks if there are errors communicating with Monsterinsights.com.
435
	 */
436
	public function test_check_connection() {
437
438
		$result = array(
439
			'label'       => __( 'Can connect to MonsterInsights.com correctly', 'google-analytics-for-wordpress' ),
440
			'status'      => 'good',
441
			'badge'       => array(
442
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
443
				'color' => 'blue',
444
			),
445
			'description' => __( 'The MonsterInsights API is reachable and no connection issues have been detected.', 'google-analytics-for-wordpress' ),
446
			'test'        => 'monsterinsights_connection',
447
		);
448
449
		$url      = 'https://api.monsterinsights.com/v2/test/';
450
		$params   = array(
451
			'sslverify'  => false,
452
			'timeout'    => 2,
453
			'user-agent' => 'MonsterInsights/' . MONSTERINSIGHTS_VERSION,
454
			'body'       => '',
455
		);
456
		$response = wp_remote_get( $url, $params );
457
458
		if ( is_wp_error( $response ) || $response['response']['code'] < 200 || $response['response']['code'] > 300 ) {
459
			$result['status']      = 'critical';
460
			$result['label']       = __( 'The MonsterInsights server is not reachable.', 'google-analytics-for-wordpress' );
461
			$result['description'] = __( 'Your server is blocking external requests to monsterinsights.com, please check your firewall settings or contact your host for more details.', 'google-analytics-for-wordpress' );
462
463
			if ( is_wp_error( $response ) ) {
464
				// Translators: The error message received.
465
				$result['description'] .= ' ' . sprintf( __( 'Error message: %s', 'google-analytics-for-wordpress' ), $response->get_error_message() );
466
			}
467
		}
468
469
		wp_send_json_success( $result );
470
	}
471
472
	/**
473
	 * Checks if there is a duplicate tracker.
474
	 */
475
	public function test_check_tracking_code() {
476
477
		$result = array(
478
			'label'       => __( 'Tracking code is properly being output.', 'google-analytics-for-wordpress' ),
479
			'status'      => 'good',
480
			'badge'       => array(
481
				'label' => __( 'MonsterInsights', 'google-analytics-for-wordpress' ),
482
				'color' => 'blue',
483
			),
484
			'description' => __( 'The Google Analytics tracking code is being output correctly, and no duplicate Google Analytics scripts have been detected.', 'google-analytics-for-wordpress' ),
485
			'test'        => 'monsterinsights_tracking_code',
486
		);
487
488
		$errors = monsterinsights_is_code_installed_frontend();
489
490
		if ( ! empty( $errors ) && is_array( $errors ) && ! empty( $errors[0] ) ) {
491
			if ( $this->is_coming_soon_active() ) {
492
				$result['status']      = 'good';
493
				$result['label']       = __( 'Tracking code disabled: coming soon/maintenance mode plugin present', 'ga-premium' );
494
				$result['description'] = __( 'MonsterInsights has detected that you have a coming soon or maintenance mode plugin currently activated on your site. This plugin does not allow other plugins (like MonsterInsights) to output Javascript, and thus MonsterInsights is not currently tracking your users (expected). Once the coming soon/maintenance mode plugin is deactivated, tracking will resume automatically.', 'ga-premium' );
495
			} else {
496
				$result['status']      = 'critical';
497
				$result['label']       = __( 'MonsterInsights has automatically detected an issue with your tracking setup', 'google-analytics-for-wordpress' );
498
				$result['description'] = $errors[0];
499
			}
500
		}
501
502
		wp_send_json_success( $result );
503
	}
504
}
505
506
new MonsterInsights_WP_Site_Health_Lite();
507
508