84% the-mojo-admin-toolbox

Code Review | The Mojo Admin Toolbox

WordPress plugin The Mojo Admin Toolbox scored84%from 54 tests.

About plugin

  • Plugin page: the-mojo-admin-to...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2012
  • Latest release: Jul 21, 2015
  • Number of updates: 36
  • Update frequency: every 35.6 days
  • Top authors: mojowill (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /5,706 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.09MB] [CPU: ▼6.72ms] Passed 4 tests

An overview of server-side resources used by The Mojo Admin Toolbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.82 ▲1.26
Dashboard /wp-admin3.40 ▲0.0651.64 ▼15.77
Posts /wp-admin/edit.php3.51 ▲0.1651.83 ▲3.76
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.97 ▼6.11
Media Library /wp-admin/upload.php3.33 ▲0.1033.34 ▼6.26
Mojo Toolbox /wp-admin/options-general.php?page=mojoToolbox-options3.3238.52

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

Browser metrics Passed 4 tests

Checking browser requirements for The Mojo Admin Toolbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5213.29 ▼0.681.88 ▲0.1344.33 ▼3.62
Dashboard /wp-admin2,216 ▲135.79 ▲0.88104.60 ▼2.7035.21 ▼14.13
Posts /wp-admin/edit.php2,095 ▼82.05 ▲0.0339.30 ▲1.5832.36 ▼5.96
Add New Post /wp-admin/post-new.php1,546 ▲1518.27 ▼4.78625.98 ▼7.5356.54 ▲6.69
Media Library /wp-admin/upload.php1,395 ▼54.25 ▲0.0293.43 ▼15.0937.07 ▼9.77
Mojo Toolbox /wp-admin/options-general.php?page=mojoToolbox-options1,2873.0543.7866.86

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 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-mojo-admin-toolbox/includes/remove-comments.class.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/the-mojo-admin-toolbox/mojo-toolbox.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: admin, tools

the-mojo-admin-toolbox/mojo-toolbox.php 92% from 13 tests

The main PHP script in "The Mojo Admin Toolbox" version 1.3.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("the-mojo-admin-toolbox.php" instead of "mojo-toolbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin405 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4155381380
JavaScript191325

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity24.00
▷ Minimum class complexity11.00
▷ Maximum class complexity35.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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 files were detected