84% multitool

Code Review | Multitool

WordPress plugin Multitool scored84%from 54 tests.

About plugin

  • Plugin page: multitool
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Jun 3, 2015
  • Latest release: Jun 20, 2017
  • Number of updates: 25
  • Update frequency: every 29.9 days
  • Top authors: WebTechGlobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.41ms] Passed 4 tests

Server-side resources used by Multitool
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.00 ▲0.12
Dashboard /wp-admin3.49 ▲0.1950.36 ▲1.21
Posts /wp-admin/edit.php3.53 ▲0.1755.69 ▲3.79
Add New Post /wp-admin/post-new.php6.14 ▲0.2579.09 ▼22.33
Media Library /wp-admin/upload.php3.37 ▲0.1437.48 ▼0.62
Config Tools /wp-admin/tools.php?page=multitool-config3.3736.56
Quick Tools /wp-admin/tools.php?page=multitool-quick3.3739.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 124 new files
Database: no new tables, 18 new options
New WordPress options
multitool_main_listener_switch
adminaccountscap_activate
adminaccountscap_limit
widget_recent-comments
multitool_maintenancemode_activate
widget_recent-posts
multitool_db_version
adminaccountscap_alerttype
multitool_public_listener_switch
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Multitool
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼1.041.68 ▼0.0743.15 ▼0.65
Dashboard /wp-admin2,228 ▲405.85 ▲0.99101.28 ▼4.2442.01 ▲0.16
Posts /wp-admin/edit.php2,114 ▲222.05 ▲0.0035.28 ▼5.5434.28 ▼1.87
Add New Post /wp-admin/post-new.php1,537 ▲423.24 ▼0.12673.53 ▲32.9848.50 ▼6.66
Media Library /wp-admin/upload.php1,410 ▲224.30 ▼0.02101.06 ▼15.5044.86 ▼6.66
Config Tools /wp-admin/tools.php?page=multitool-config1,3952.7853.9326.75
Quick Tools /wp-admin/tools.php?page=multitool-quick1,4512.6950.9824.17

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
  • Zombie WordPress options were found after uninstall: 18 options
    • adminaccountscap_alerttype
    • can_compress_scripts
    • multitool_db_version
    • adminaccountscap_activate
    • multitool_public_listener_switch
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • multitool_main_listener_switch
    • multitool_admin_listener_switch
    • adminaccountscap_limit
    • ...

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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multitool/includes/widgets/functions.multitool-widget-example.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Multitool_Async_Request' not found in wp-content/plugins/multitool/includes/libraries/library.background-process.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/multitool/includes/libraries/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/multitool/includes/libraries/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php:2109

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === multitool === )
Please take inspiration from this readme.txt

multitool/multitool.php 92% from 13 tests

The principal PHP file in "Multitool" v. 1.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.2" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin15,185 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,6144,1956,114
PO File171,4491,9934,842
JavaScript96244212,913
Markdown41850778
Sass2250532
INI1104
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.84
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes48
▷ Abstract classes48.33%
▷ Concrete classes4491.67%
▷ Final classes12.27%
Methods375
▷ Static methods8923.73%
▷ Public methods30481.07%
▷ Protected methods5013.33%
▷ Private methods215.60%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants3592.11%
▷ Class constants37.89%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/multitool_logo.png86.15KB12.18KB▼ 85.86%