67% netping-site-monitor

Code Review | NEW! Wordpress Status Monitor

WordPress plugin NEW! Wordpress Status Monitor scored 67% from 54 tests.

About plugin

  • Plugin page: netping-site-monitor
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2021
  • Latest release: Oct 18, 2021
  • Number of updates: 150
  • Update frequency: every 1.6 days
  • Top authors: netping (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,372 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.85ms] Passed 4 tests

Analyzing server-side resources used by NEW! Wordpress Status Monitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.88 ▼5.50
Dashboard /wp-admin3.34 ▲0.0447.21 ▼2.82
Posts /wp-admin/edit.php3.39 ▲0.0352.39 ▲4.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.27 ▼7.61
Media Library /wp-admin/upload.php3.26 ▲0.0340.78 ▲7.45
/wp-admin/admin.php?page=netping_supply_token3.2532.26
/wp-admin/admin.php?page=netping_supply_node3.26313.16
/wp-admin/admin.php?page=netping_redirect_upgrade3.2529.15
/wp-admin/admin.php?page=netping_redirect_dashboard3.2530.01
/wp-admin/admin.php?page=netping_supply_email3.2525.44
/wp-admin/admin.php?page=netping_plugin_settings3.28331.78
/wp-admin/admin.php?page=netping_alerts3.27292.77
/wp-admin/admin.php?page=netping_action3.2629.03

Server storage [IO: ▲0.88MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
netping_setup_complete
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for NEW! Wordpress Status Monitor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11815.04 ▲0.741.82 ▼0.2447.85 ▼2.99
Dashboard /wp-admin2,228 ▲406.80 ▲1.92133.21 ▲16.3743.98 ▼4.95
Posts /wp-admin/edit.php2,117 ▲313.64 ▲1.6153.56 ▲17.8535.27 ▲1.75
Add New Post /wp-admin/post-new.php1,555 ▲2119.62 ▼3.43623.91 ▲5.2934.74 ▼18.80
Media Library /wp-admin/upload.php1,419 ▲346.09 ▲1.92112.17 ▲0.9543.15 ▼3.79
/wp-admin/admin.php?page=netping_supply_token8713.3541.3040.00
/wp-admin/admin.php?page=netping_supply_node8733.2036.9030.37
/wp-admin/admin.php?page=netping_redirect_upgrade7502.9418.6223.62
/wp-admin/admin.php?page=netping_redirect_dashboard7502.6818.9323.38
/wp-admin/admin.php?page=netping_supply_email8683.2434.4525.02
/wp-admin/admin.php?page=netping_plugin_settings9663.2834.6428.19
/wp-admin/admin.php?page=netping_alerts8623.3334.3123.57
/wp-admin/admin.php?page=netping_action7893.2840.8321.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • netping_setup_complete
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=netping_supply_node
    • > Notice in wp-content/plugins/netping-site-monitor/pages/_supply_node.php+44
    Undefined property: stdClass::$data
    • > GET request to /wp-admin/admin.php?page=netping_supply_node
    • > Warning in wp-content/plugins/netping-site-monitor/pages/_supply_node.php+44
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=netping_plugin_settings
    • > Notice in wp-content/plugins/netping-site-monitor/pages/_plugin_settings.php+60
    Undefined property: stdClass::$access_level
    • > GET request to /wp-admin/admin.php?page=netping_alerts
    • > Notice in wp-content/plugins/netping-site-monitor/pages/_alerts.php+68
    Undefined property: stdClass::$triggers
    • > GET request to /wp-admin/admin.php?page=netping_alerts
    • > Notice in wp-content/plugins/netping-site-monitor/pages/_alerts.php+68
    Trying to get property 'data' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/netping-site-monitor/probe.php
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/pages/_redirect_upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/pages/_supply_email.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_reinit_with_message.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_create_recipient.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_create_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/pages/start.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_save_token.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/pages/_validate_account.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_create_dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/netping-site-monitor/actions/_create_check.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=netping_redirect_upgrade
    • > Network (severe)
    https://netping.com/api/v1/users?login=true&api_token=&redirect_to=upgrade - Failed to load resource: the server responded with a status of 401 ()
    • > GET request to /wp-admin/admin.php?page=netping_redirect_dashboard
    • > Network (severe)
    https://netping.com/api/v1/users?login=true&api_token= - Failed to load resource: the server responded with a status of 401 ()
    • > GET request to /wp-admin/admin.php?page=netping_alerts
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=netping_alerts 193:17 Uncaught TypeError: Cannot read properties of null (reading 'forEach')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: expire, monitor, uptime, status, check

netping-site-monitor/netping.php 92% from 13 tests

"NEW! Wordpress Status Monitor" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("netping-site-monitor.php" instead of "netping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected18,354 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,13655016,421
PHP251862091,659
CSS31922217
SVG10057

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions315.79%
▷ Anonymous functions1684.21%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected