83% wpx-maintenance-pro-light

Code Review | WPX Maintenance Pro Light

WordPress plugin WPX Maintenance Pro Light scored83%from 54 tests.

About plugin

  • Plugin page: wpx-maintenance-p...
  • Plugin version: 2.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Jan 3, 2015
  • Latest release: Sep 7, 2021
  • Number of updates: 26
  • Update frequency: every 93.8 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,504 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.46MB] [CPU: ▼1.76ms] Passed 4 tests

A check of server-side resources used by WPX Maintenance Pro Light
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4949.24 ▲9.94
Dashboard /wp-admin3.81 ▲0.5053.77 ▼2.64
Posts /wp-admin/edit.php3.86 ▲0.5057.44 ▲8.00
Add New Post /wp-admin/post-new.php6.33 ▲0.4489.88 ▼12.86
Media Library /wp-admin/upload.php3.67 ▲0.4338.56 ▲0.48

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 134 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
wpx_maintenance_pro_light_slug
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPX Maintenance Pro Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲4414.35 ▼0.211.90 ▼0.1044.95 ▲1.98
Dashboard /wp-admin2,211 ▲345.61 ▼0.0792.44 ▼3.1740.86 ▼2.39
Posts /wp-admin/edit.php2,116 ▲131.98 ▲0.0340.03 ▼1.2736.81 ▼1.54
Add New Post /wp-admin/post-new.php1,539 ▲1323.83 ▲0.30679.53 ▼15.2461.02 ▲9.23
Media Library /wp-admin/upload.php1,419 ▲194.16 ▼0.10101.82 ▼8.0342.13 ▼2.42

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Foundation\\Plugin' not found in wp-content/plugins/wpx-maintenance-pro-light/bootstrap/plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\Http\\Controllers\\Controller' not found in wp-content/plugins/wpx-maintenance-pro-light/plugin/Http/Controllers/Settings/SettingsController.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-maintenance-pro-light/vendor/wpbones/wpbones/src/Html/HtmlTagForm.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-maintenance-pro-light/vendor/wpbones/wpbones/src/Html/HtmlTagFieldSet.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/wpx-maintenance-pro-light/resources/views/settings/scheduling.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-maintenance-pro-light/vendor/wpbones/wpbones/src/Html/HtmlTagOptGroup.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/wpx-maintenance-pro-light/resources/views/settings/rules.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Routing\\Controller' not found in wp-content/plugins/wpx-maintenance-pro-light/plugin/Http/Controllers/Controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-maintenance-pro-light/vendor/wpbones/wpbones/src/Html/HtmlTagOption.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXMaintenanceProLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-maintenance-pro-light/vendor/wpbones/wpbones/src/Html/HtmlTagA.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: coming, maintenance, users, ip

wpx-maintenance-pro-light/index.php 69% from 13 tests

The entry point to "WPX Maintenance Pro Light" version 2.3.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("localization")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: Please prefix the domain path with a forward slash character ("/localization")
  • Main file name: Name the main plugin file the same as the plugin slug ("wpx-maintenance-pro-light.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin6,733 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP691,2242,2754,842
CSS151126497
Markdown71650387
LESS55618360
JSON500272
PO File2134200252
JavaScript54232123

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity10.59
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces2
Traits0
Classes44
▷ Abstract classes1022.73%
▷ Concrete classes3477.27%
▷ Final classes00.00%
Methods256
▷ Static methods5722.27%
▷ Public methods20479.69%
▷ Protected methods4216.41%
▷ Private methods103.91%
Functions19
▷ Named functions1368.42%
▷ Anonymous functions631.58%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.69MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png16.58KB6.41KB▼ 61.33%
assets/screenshot-4.png198.26KB47.35KB▼ 76.12%
assets/screenshot-1.png111.43KB27.78KB▼ 75.07%
assets/screenshot-3.png181.36KB44.70KB▼ 75.35%
assets/icon-256x256.png35.63KB12.23KB▼ 65.66%