83% wp-toolbelt

Code Review | Toolbelt

WordPress plugin Toolbelt scored83%from 54 tests.

About plugin

  • Plugin page: wp-toolbelt
  • Plugin version: 3.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Aug 20, 2019
  • Latest release: Mar 5, 2023
  • Number of updates: 59
  • Update frequency: every 21.9 days
  • Top authors: BinaryMoon (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

500+ active /14,133 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.64ms] Passed 4 tests

Analyzing server-side resources used by Toolbelt
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.89 ▼4.44
Dashboard /wp-admin3.43 ▲0.1347.87 ▼3.66
Posts /wp-admin/edit.php3.54 ▲0.1952.62 ▲2.51
Add New Post /wp-admin/post-new.php6.01 ▲0.1387.35 ▼16.95
Media Library /wp-admin/upload.php3.35 ▲0.1242.52 ▲5.12

Server storage [IO: ▲1.78MB] [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: 312 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Toolbelt
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.26 ▼0.221.74 ▼0.0739.91 ▼2.80
Dashboard /wp-admin2,208 ▲345.51 ▼0.2589.44 ▼0.8938.97 ▼2.12
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0532.81 ▼3.8233.17 ▼3.44
Add New Post /wp-admin/post-new.php1,548 ▲1118.34 ▼0.21632.65 ▼19.0568.85 ▼12.41
Media Library /wp-admin/upload.php1,410 ▲104.19 ▼0.0395.64 ▼10.9843.71 ▼1.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 67× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-toolbelt/modules/widows/module.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-toolbelt/modules/markdown/module.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-toolbelt/modules/cookie-banner/module.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-toolbelt/modules/contact-form/module-ajax.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-toolbelt/modules/related-posts/module.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-toolbelt/modules/search-redirect/module.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-toolbelt/modules/infinite-scroll/module.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-toolbelt/modules/heading-anchors/module.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-toolbelt/modules/contact-form/module-admin.php:168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-toolbelt/modules/widget-display/module-admin.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

wp-toolbelt/index.php 92% from 13 tests

"Toolbelt" version 3.5.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-toolbelt.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin14,190 lines of code in 301 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript871,0768676,853
PHP692,5873,2925,835
Sass57914211,354
Markdown112059
CSS490049
SVG380040

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions275
▷ Named functions26295.27%
▷ Anonymous functions134.73%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected