83% worker

Code Review | ManageWP Worker

WordPress plugin ManageWP Worker scored83%from 54 tests.

About plugin

  • Plugin page: worker
  • Plugin version: 4.9.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2011
  • Latest release: Apr 5, 2023
  • Number of updates: 335
  • Update frequency: every 13.2 days
  • Top authors: freediver (100%)

Code review

54 tests

User reviews

644 reviews

Install metrics

1,000,000+ active /18,194,572 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.60MB] [CPU: ▲13.32ms] Passed 4 tests

Analyzing server-side resources used by ManageWP Worker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.02 ▲1.5655.21 ▲15.72
Dashboard /wp-admin4.96 ▲1.6565.28 ▲21.76
Posts /wp-admin/edit.php5.01 ▲1.6558.96 ▲10.52
Add New Post /wp-admin/post-new.php7.46 ▲1.5796.23 ▲7.91
Media Library /wp-admin/upload.php4.83 ▲1.6052.01 ▲19.14
ManageWP Worker Status /wp-admin/admin.php?page=worker-status4.8040.69

Server storage [IO: ▲1.99MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • You have illegally modified 1 file (0.87KB) outside of "wp-content/plugins/worker/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/0-worker.php
Filesystem: 343 new files
Database: no new tables, 23 new options
New WordPress options
mwp_maintenace_mode
mwp_recovering
mwp_core_autoupdate
user_hit_count
widget_theysaidso_widget
mwp_container_site_parameters
widget_recent-posts
theysaidso_admin_options
_worker_public_key
mwp_incremental_update_active
...

Browser metrics Passed 4 tests

Checking browser requirements for ManageWP Worker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.28 ▼0.991.89 ▲0.1428.89 ▼12.99
Dashboard /wp-admin2,316 ▲1395.83 ▲0.2684.57 ▼3.4846.57 ▲3.71
Posts /wp-admin/edit.php2,220 ▲1202.41 ▲0.4036.92 ▲0.7739.24 ▲4.88
Add New Post /wp-admin/post-new.php1,644 ▲11523.13 ▼0.04673.65 ▲9.9536.38 ▼25.47
Media Library /wp-admin/upload.php1,515 ▲1154.47 ▲0.2999.01 ▼3.8549.62 ▲7.76
ManageWP Worker Status /wp-admin/admin.php?page=worker-status9171.9629.5632.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 15 options in the database
    • worker_migration_version
    • mwp_potential_key_time
    • theysaidso_admin_options
    • mwp_openssl_parameters
    • user_hit_count
    • mwp_public_keys
    • mwp_service_key
    • widget_recent-comments
    • widget_recent-posts
    • mwp_potential_key
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 137× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog_Handler_AbstractProcessingHandler' not found in wp-content/plugins/worker/src/Monolog/Handler/TestHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MWP_Action_IncrementalBackup_AbstractFiles' not found in wp-content/plugins/worker/src/MWP/Action/IncrementalBackup/HashFiles.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog_Handler_AbstractProcessingHandler' not found in wp-content/plugins/worker/src/Monolog/Handler/StreamHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MWP_IncrementalBackup_Database_Exception' not found in wp-content/plugins/worker/src/MWP/IncrementalBackup/Database/Exception/ConnectionException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony_EventDispatcher_EventSubscriberInterface' not found in wp-content/plugins/worker/src/MWP/EventListener/PublicRequest/AutomaticLogin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MWP_Action_IncrementalBackup_Abstract' not found in wp-content/plugins/worker/src/MWP/Action/IncrementalBackup/AbstractTablesAction.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'MWP_IncrementalBackup_Database_ConnectionInterface' not found in wp-content/plugins/worker/src/MWP/IncrementalBackup/Database/PdoConnection.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony_EventDispatcher_EventSubscriberInterface' not found in wp-content/plugins/worker/src/MWP/EventListener/MasterRequest/SetCurrentUser.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'MWP_Stream_Interface' not found in wp-content/plugins/worker/src/MWP/Stream/Limit.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MWP_Action_Abstract' not found in wp-content/plugins/worker/src/MWP/Action/ConnectWebsite.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (29 tag instead of maximum 10)
The official readme.txt might help

worker/init.php 85% from 13 tests

The main PHP script in "ManageWP Worker" version 4.9.17 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("worker.php" instead of "init.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 437 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin34,242 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PHP2537,50519,39334,231
JSON10011

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 168)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.08
▷ Minimum class complexity1.00
▷ Maximum class complexity549.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity168.00
Code structure
Namespaces0
Interfaces24
Traits0
Classes229
▷ Abstract classes114.80%
▷ Concrete classes21895.20%
▷ Final classes00.00%
Methods1,893
▷ Static methods854.49%
▷ Public methods1,63886.53%
▷ Protected methods1266.66%
▷ Private methods1296.81%
Functions71
▷ Named functions71100.00%
▷ Anonymous functions00.00%
Constants382
▷ Global constants23862.30%
▷ Class constants14437.70%
▷ Public constants144100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin