78% site-uptime-monitoring

Code Review | Site Uptime Monitoring

WordPress plugin Site Uptime Monitoring scored 78% from 54 tests.

About plugin

  • Plugin page: site-uptime-monit...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 5.9.2
  • First release: Jul 28, 2020
  • Latest release: Mar 15, 2021
  • Number of updates: 5
  • Update frequency: every 46.8 days
  • Top authors: cyberlord92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 990 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼291.19ms] Passed 4 tests

Server-side resources used by Site Uptime Monitoring
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1456.31 ▲3.89
Dashboard /wp-admin3.49 ▲0.0934.16 ▼0.19
Posts /wp-admin/edit.php3.72 ▲0.0839.23 ▲1.91
Add New Post /wp-admin/post-new.php6.96 ▼0.0192.96 ▼1,168.47
Media Library /wp-admin/upload.php3.37 ▲0.0825.81 ▲2.01
Website Statistics /wp-admin/admin.php?page=moSUT_site_statistics3.3627.40
Uptime Monitor /wp-admin/admin.php?page=moSUT_site_uptime3.3722.78
Upgrade /wp-admin/admin.php?page=moSUT_site_upgrade3.3624.80
Account /wp-admin/admin.php?page=moSUT_site_account3.4632.43

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 3 new options
New WordPress options
MoSUT_dbversion
mo_wpns_new_registration
mo_2factor_user_registration_status

Browser metrics Passed 4 tests

Site Uptime Monitoring: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲6016.11 ▲0.165.57 ▼0.312.43 ▲0.11
Dashboard /wp-admin2,936 ▲826.26 ▲0.08117.40 ▼14.41181.32 ▲23.11
Posts /wp-admin/edit.php2,733 ▲453.13 ▼0.1163.33 ▼2.20140.95 ▲3.84
Add New Post /wp-admin/post-new.php1,780 ▲11221.08 ▲1.70440.55 ▲40.36183.81 ▲27.96
Media Library /wp-admin/upload.php1,739 ▲415.55 ▲0.02127.33 ▼7.66197.05 ▲11.23
Website Statistics /wp-admin/admin.php?page=moSUT_site_statistics1,4753.0673.97190.81
Uptime Monitor /wp-admin/admin.php?page=moSUT_site_uptime1,2912.9655.07236.94
Upgrade /wp-admin/admin.php?page=moSUT_site_upgrade1,1392.6658.04137.21
Account /wp-admin/admin.php?page=moSUT_site_account1,2772.6654.40154.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 2 options
    • mo_2factor_user_registration_status
    • mo_wpns_new_registration

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/site-uptime-monitoring/views/SiteUptime_statistics.php
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: profile_url in wp-content/plugins/site-uptime-monitoring/views/navbar.php on line 7
    • > PHP Notice
      Undefined variable: MoSUTDirName in wp-content/plugins/site-uptime-monitoring/controllers/SiteUptime_statistics.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/site-uptime-monitoring/controllers/SiteUptime_account.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/site-uptime-monitoring/controllers/support.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/site-uptime-monitoring/views/account/profile.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/site-uptime-monitoring/views/account/login.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/site-uptime-monitoring/controllers/SiteUptime_registeration.php:2
    • > PHP Warning
      include(controllers/navbar.php): failed to open stream: No such file or directory in wp-content/plugins/site-uptime-monitoring/controllers/main_controller.php on line 5
    • > PHP Warning
      include(): Failed opening 'controllers/navbar.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/site-uptime-monitoring/controllers/main_controller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/site-uptime-monitoring/views/support.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Domain Registration UI), #2 (Website Statistics Report)
The official readme.txt might help

site-uptime-monitoring/miniorange_siteUptime_settings.php 92% from 13 tests

The main PHP script in "Site Uptime Monitoring" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("site-uptime-monitoring.php" instead of "miniorange_siteUptime_settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,690 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP211729984
CSS2597538
JavaScript3325168

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2696.30%
▷ Protected methods00.00%
▷ Private methods13.70%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants16.67%
▷ Class constants1493.33%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/miniorange_logo.png1.95KB1.16KB▼ 40.58%
includes/images/miniorange_icon.png0.44KB0.35KB▼ 18.61%
includes/images/support3.png2.49KB2.11KB▼ 15.28%