78% admin-menu-organizer

Code Review | Admin Menu Organizer

WordPress plugin Admin Menu Organizer scored78%from 54 tests.

About plugin

  • Plugin page: admin-menu-organizer
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Apr 22, 2018
  • Latest release: Jul 22, 2018
  • Number of updates: 5
  • Update frequency: every 58.4 days
  • Top authors: phpdevca (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

90+ active /1,943 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.15MB] [CPU: ▼4.02ms] Passed 4 tests

This is a short check of server-side resources used by Admin Menu Organizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.18 ▼11.74
Dashboard /wp-admin3.46 ▲0.1647.98 ▼1.88
Posts /wp-admin/edit.php3.58 ▲0.2250.75 ▲1.17
Add New Post /wp-admin/post-new.php6.06 ▲0.1888.19 ▼3.63
Media Library /wp-admin/upload.php3.38 ▲0.1637.89 ▲4.22
Admin Menu Organizer /wp-admin/admin.php?page=ams_settings3.3734.76
Import / Export /wp-admin/admin.php?page=ams_import_export3.3535.08
User Settings /wp-admin/admin.php?page=ams_preferences_page3.3733.15
Global Settings /wp-admin/admin.php?page=ams_global_settings_page3.3534.42

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

Browser metrics Passed 4 tests

Checking browser requirements for Admin Menu Organizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲8913.51 ▼0.911.80 ▼1.1740.26 ▼21.03
Dashboard /wp-admin2,269 ▲815.15 ▲0.23108.94 ▼0.8438.28 ▼9.93
Posts /wp-admin/edit.php2,132 ▲432.55 ▲0.5938.71 ▼2.5030.23 ▼5.80
Add New Post /wp-admin/post-new.php1,568 ▲4023.22 ▲5.08639.93 ▲37.0634.75 ▼14.95
Media Library /wp-admin/upload.php1,456 ▲714.53 ▲0.3388.81 ▼17.8240.08 ▼3.20
Admin Menu Organizer /wp-admin/admin.php?page=ams_settings1,5312.6452.7342.97
Import / Export /wp-admin/admin.php?page=ams_import_export8672.1430.7230.70
User Settings /wp-admin/admin.php?page=ams_preferences_page1,4642.9759.1126.27
Global Settings /wp-admin/admin.php?page=ams_global_settings_page1,1782.1630.4326.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=ams_preferences_page
    • > Notice in wp-content/plugins/admin-menu-organizer/admin_pages/preferences.php+127
    Undefined index: expander_hover_background
    • > GET request to /wp-admin/admin.php?page=ams_preferences_page
    • > Notice in wp-content/plugins/admin-menu-organizer/admin_pages/preferences.php+136
    Undefined index: expander_hover_foreground

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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/admin-menu-organizer/admin_pages/preferences.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-menu-organizer/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/admin-menu-organizer/admin_pages/import_export.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/admin-menu-organizer/admin_pages/global.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/admin-menu-organizer/admin_pages/sorter.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-menu-organizer/ajax.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

admin-menu-organizer/admin-menu-organizer.php Passed 13 tests

The main PHP script in "Admin Menu Organizer" version 1.0.1 is automatically included on every request by WordPress
48 characters long description:
Arrange your admin menu into expandable sections

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,996 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7622731,356
CSS15615343
JavaScript112019297

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity70.50
▷ Minimum class complexity11.00
▷ Maximum class complexity130.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin