94% admin-toolbar-menus

Code Review | Admin Toolbar Menus

WordPress plugin Admin Toolbar Menus scored 94% from 54 tests.

About plugin

  • Plugin page: admin-toolbar-menus
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 5.9.2
  • First release: Dec 26, 2013
  • Latest release: Jan 5, 2022
  • Number of updates: 40
  • Update frequency: every 73.4 days
  • Top authors: Benbodhi (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active / 14,958 total downloads


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

An overview of server-side resources used by Admin Toolbar Menus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0556.73 ▲5.06
Dashboard /wp-admin3.43 ▲0.0233.22 ▼0.48
Posts /wp-admin/edit.php3.66 ▲0.0137.72 ▼12.65
Add New Post /wp-admin/post-new.php6.90 ▼0.0796.29 ▼1,168.00
Media Library /wp-admin/upload.php3.32 ▲0.0226.67 ▲0.44
Menus /wp-admin/nav-menus.php3.4234.75

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Admin Toolbar Menus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▼4015.87 ▲0.096.08 ▼1.782.34 ▲0.25
Dashboard /wp-admin2,849 ▼126.14 ▼0.06124.38 ▼12.79161.10 ▲2.28
Posts /wp-admin/edit.php2,645 ▼433.23 ▼0.0162.23 ▲0.89141.04 ▲3.57
Add New Post /wp-admin/post-new.php1,691 ▲3020.86 ▲0.11445.33 ▲16.10161.49 ▲4.01
Media Library /wp-admin/upload.php1,655 ▼435.50 ▲0.04146.78 ▲0.16192.91 ▲0.64
Menus /wp-admin/nav-menus.php2,2583.1478.30130.80

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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/admin-toolbar-menus/admin-toolbar-menus.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


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
Please fix the following attributes:
  • Tested up to: Invalid plugin version format
The official readme.txt is a good inspiration

admin-toolbar-menus/admin-toolbar-menus.php Passed 13 tests

The main PHP script in "Admin Toolbar Menus" version 1.0.4 is automatically included on every request by WordPress
87 characters long description:
Seamlessly adds 3 new menu locations to the admin toolbar and removes the WP logo menu.

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
Everything looks great! No dangerous files found in this plugin176 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File14627

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
No PNG images were found in this plugin