88% admin-menu-editor

Code Review | Admin Menu Editor

WordPress plugin Admin Menu Editor scored 88% from 54 tests.

About plugin

  • Plugin page: admin-menu-editor
  • Plugin version: 1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8.1
  • WordPress version: 5.9.2
  • First release: Dec 13, 2009
  • Latest release: Oct 21, 2021
  • Number of updates: 1,113
  • Update frequency: every 4.0 days
  • Top authors: whiteshadow (100%)

Code review

54 tests

User reviews

258 reviews

Install metrics

300,000+ active / 4,114,945 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.34MB] [CPU: ▼292.10ms] Passed 4 tests

This is a short check of server-side resources used by Admin Menu Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.75 ▲1.2467.40 ▲10.39
Dashboard /wp-admin4.77 ▲1.3642.09 ▲7.51
Posts /wp-admin/edit.php5.06 ▲1.4248.96 ▲10.04
Add New Post /wp-admin/post-new.php8.30 ▲1.33105.40 ▼1,162.63
Media Library /wp-admin/upload.php4.72 ▲1.4231.24 ▼23.33
Menu Editor /wp-admin/options-general.php?page=menu_editor5.3343.96

Server storage [IO: ▲2.62MB] [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: 179 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Admin Menu Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲7516.46 ▲0.775.76 ▼0.062.20 ▲0.12
Dashboard /wp-admin2,925 ▲676.45 ▲0.29123.39 ▼13.18162.45 ▼7.02
Posts /wp-admin/edit.php2,719 ▲283.20 ▼0.0469.66 ▲4.44155.14 ▼4.68
Add New Post /wp-admin/post-new.php1,702 ▲4215.89 ▼5.81410.94 ▼16.83167.44 ▲7.56
Media Library /wp-admin/upload.php1,732 ▲375.69 ▲0.17153.90 ▲10.34252.77 ▲62.29
Menu Editor /wp-admin/options-general.php?page=menu_editor4,0588.49153.65208.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/admin-menu-editor/includes/generate-menu-dashicons.php
    • > /wp-content/plugins/admin-menu-editor/modules/actor-selector/actor-selector-template.php
    • > /wp-content/plugins/admin-menu-editor/includes/cap-suggestion-box.php
    • > /wp-content/plugins/admin-menu-editor/includes/test-access-screen.php
  • 37× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/CSSList/Document.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSList' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/CSSList/CSSBlockList.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/admin-menu-editor/modules/plugin-visibility/plugin-visibility-template.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/URL.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\Value' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/PrimitiveValue.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'amePersistentModule' not found in wp-content/plugins/admin-menu-editor/modules/plugin-visibility/plugin-visibility.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ameModule' not found in wp-content/plugins/admin-menu-editor/modules/admin-css/admin-css.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/Property/CSSNamespace.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/CSSFunction.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/admin-menu-editor/includes/PHP-CSS-Parser/lib/Sabberworm/CSS/Value/Value.php:7

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Screenshots: Please add images for these screenshots: #1 (Plugin interface), #2 (A sample menu created by the plugin), #3 (Re-ordering menu items via drag and drop)
The official readme.txt is a good inspiration

admin-menu-editor/menu-editor.php 92% from 13 tests

The main PHP file in "Admin Menu Editor" ver. 1.10 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-menu-editor.php" instead of "menu-editor.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
Good job! No executable or dangerous file extensions detected44,067 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity25.80
▷ Minimum class complexity1.00
▷ Maximum class complexity637.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
▷ Abstract classes1218.75%
▷ Concrete classes5281.25%
▷ Final classes23.85%
▷ Static methods6911.00%
▷ Public methods45772.89%
▷ Protected methods355.58%
▷ Private methods13521.53%
▷ Named functions1578.95%
▷ Anonymous functions421.05%
▷ Global constants12.50%
▷ Class constants3997.50%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
38 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/font-awesome/undo.png1.13KB0.26KB▼ 76.80%
images/page-add.png1.42KB0.52KB▼ 63.38%
images/font-awesome/angle-double-down.png1.12KB0.20KB▼ 82.62%
images/x.png1.03KB0.12KB▼ 88.72%