83% wp-management-controller

Code Review | WP Controller

WordPress plugin WP Controller scored83%from 54 tests.

About plugin

  • Plugin page: wp-management-con...
  • Plugin version: 3.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 11, 2014
  • Latest release: Mar 9, 2021
  • Number of updates: 75
  • Update frequency: every 33.7 days
  • Top authors: pigeonhut (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /19,624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.64MB] [CPU: ▼22.41ms] Passed 4 tests

Analyzing server-side resources used by WP Controller
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.00 ▼3.66
Dashboard /wp-admin3.33 ▼0.0250.08 ▼16.71
Posts /wp-admin/edit.php3.44 ▲0.0946.75 ▼6.53
Add New Post /wp-admin/post-new.php3.30 ▼2.5836.32 ▼62.73
Media Library /wp-admin/upload.php3.25 ▲0.0235.72 ▲0.48

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 177 new files
Database: no new tables, 8 new options
New WordPress options
wp_management_controller_version
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wpmc_api_setting

Browser metrics Passed 4 tests

WP Controller: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.18 ▼0.222.34 ▲0.3442.92 ▼1.04
Dashboard /wp-admin2,211 ▲405.56 ▼0.1085.25 ▼11.1335.64 ▼7.16
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0240.94 ▲5.5235.24 ▼0.13
Add New Post /wp-admin/post-new.php1,541 ▲1523.40 ▼0.31659.73 ▼1.6763.45 ▲14.95
Media Library /wp-admin/upload.php1,413 ▲164.23 ▲0.07100.80 ▼4.0443.38 ▼4.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 77× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      constant(): Couldn't find constant ParagonIE_Sodium_Compat::VERSION_STRING in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/lib/php72compat.php on line 72
    • > PHP Warning
      constant(): Couldn't find constant ParagonIE_Sodium_Compat::LIBRARY_VERSION_MAJOR in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/lib/php72compat.php on line 72
    • > PHP Fatal error
      Uncaught UnexpectedValueException: creating archive "wp-content/plugins/wp-management-controller/vendor/paragonie/random_compat/dist/random_compat.phar" disabled by the php.ini setting phar.readonly in /var/www/wordpress/wp-content/plugins/wp-management-controller/vendor/paragonie/random_compat/other/build_phar.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519_H' not found in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/src/Core/Curve25519.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-management-controller/views/piwik_settings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/src/Core/ChaCha20.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/namespaced/Core/Util.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core32_Curve25519' not found in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/src/Core32/X25519.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core32_ChaCha20' not found in wp-content/plugins/wp-management-controller/vendor/paragonie/sodium_compat/src/Core32/HChaCha20.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-management-controller/inc/class-wpmc-rest-controller.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (2.), #3 (4.), #5 ()
The official readme.txt might help

wp-management-controller/wp-management-controller.php 92% from 13 tests

The main PHP script in "WP Controller" version 3.2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected40,326 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1435,92221,69039,677
JSON500267
Markdown2710242
XML20047
JavaScript23034
make19426
YAML12025
Bourne Shell2418

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 142)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity39.55
▷ Minimum class complexity1.00
▷ Maximum class complexity604.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity142.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes121
▷ Abstract classes2117.36%
▷ Concrete classes10082.64%
▷ Final classes00.00%
Methods1,233
▷ Static methods42834.71%
▷ Public methods1,16594.48%
▷ Protected methods594.79%
▷ Private methods90.73%
Functions151
▷ Named functions14898.01%
▷ Anonymous functions31.99%
Constants431
▷ Global constants23754.99%
▷ Class constants19445.01%
▷ Public constants194100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin