88% admin-menu-organizer

Code Review | Admin Menu Organizer

WordPress plugin Admin Menu Organizer scored 88% 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: 5.9.2
  • 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

100+ active / 1,600 total downloads

Benchmarks

Plugin footprint Passed 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.14MB] [CPU: ▼301.45ms] Passed 4 tests

Analyzing server-side resources used by Admin Menu Organizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2065.00 ▲7.07
Dashboard /wp-admin3.57 ▲0.1640.77 ▼42.25
Posts /wp-admin/edit.php3.80 ▲0.1643.65 ▲1.24
Add New Post /wp-admin/post-new.php7.04 ▲0.0798.55 ▼1,170.80
Media Library /wp-admin/upload.php3.45 ▲0.1531.50 ▲6.00
User Settings /wp-admin/admin.php?page=ams_preferences_page3.4426.80
Admin Menu Organizer /wp-admin/admin.php?page=ams_settings3.4429.12
Import / Export /wp-admin/admin.php?page=ams_import_export3.4229.69
Global Settings /wp-admin/admin.php?page=ams_global_settings_page3.4328.46

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, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Menu Organizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲7815.66 ▲0.096.21 ▼0.232.31 ▲0.26
Dashboard /wp-admin2,944 ▲836.93 ▲0.63130.20 ▼6.00157.82 ▼23.54
Posts /wp-admin/edit.php2,753 ▲623.48 ▲0.2467.09 ▼19.86156.85 ▲14.93
Add New Post /wp-admin/post-new.php1,716 ▲5515.72 ▼0.37433.06 ▼11.86171.32 ▲14.94
Media Library /wp-admin/upload.php1,765 ▲706.08 ▲0.61124.76 ▼20.03198.16 ▲12.03
User Settings /wp-admin/admin.php?page=ams_preferences_page2,1064.2285.5999.05
Admin Menu Organizer /wp-admin/admin.php?page=ams_settings1,9954.0088.72138.66
Import / Export /wp-admin/admin.php?page=ams_import_export1,0773.3164.60161.59
Global Settings /wp-admin/admin.php?page=ams_global_settings_page1,3893.3058.58146.92

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 completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× 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/admin-menu-organizer/ajax.php:3
    • > 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 admin_url() in wp-content/plugins/admin-menu-organizer/admin_pages/import_export.php:12
    • > 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 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/preferences.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

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

The entry point to "Admin Menu Organizer" version 1.0.1 is a PHP file that has certain tags in its header comment area
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 programming languages used in this plugin; dangerous file extensions are not allowed
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

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin