79% wp-admin-menu-wizard

Code Review | Admin Menu Cleaner

WordPress plugin Admin Menu Cleaner scored 79% from 54 tests.

About plugin

  • Plugin page: wp-admin-menu-wizard
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2020
  • Latest release: Jan 5, 2023
  • Number of updates: 18
  • Update frequency: every 51.7 days
  • Top authors: alfadevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 700 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼31.98ms] Passed 4 tests

A check of server-side resources used by Admin Menu Cleaner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.56 ▲1.34
Dashboard /wp-admin3.02 ▼0.2824.32 ▼26.02
Posts /wp-admin/edit.php3.02 ▼0.3324.01 ▼27.36
Add New Post /wp-admin/post-new.php3.02 ▼2.8622.97 ▼63.85
Media Library /wp-admin/upload.php3.02 ▼0.2023.76 ▼10.67

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Admin Menu Cleaner: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6913.25 ▼1.111.62 ▼0.4543.85 ▼2.94
Dashboard /wp-admin2,232 ▲465.89 ▲0.8899.13 ▼17.6738.02 ▼6.30
Posts /wp-admin/edit.php2,115 ▲262.02 ▲0.0537.14 ▼4.6833.44 ▼1.55
Add New Post /wp-admin/post-new.php1,536 ▲2217.61 ▼0.09674.67 ▼33.1659.37 ▲4.85
Media Library /wp-admin/upload.php1,417 ▲294.24 ▲0.0599.81 ▼7.9842.84 ▼2.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > Notice in wp-content/plugins/wp-admin-menu-wizard/admin-menu-cleaner.php+127
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

wp-admin-menu-wizard/admin-menu-cleaner.php 92% from 13 tests

The main PHP file in "Admin Menu Cleaner" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-admin-menu-wizard.php" instead of "admin-menu-cleaner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin212 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42957148
CSS166150
JavaScript241114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods583.33%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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