84% admin-toolbar-menus

Code Review | Admin Toolbar Menus

WordPress plugin Admin Toolbar Menus scored84%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: 6.3.1
  • 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

20 reviews

Install metrics

1,000+ active /16,717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.88ms] Passed 4 tests

This is a short check of server-side resources used by Admin Toolbar Menus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.01 ▼1.26
Dashboard /wp-admin3.33 ▼0.0248.14 ▼7.85
Posts /wp-admin/edit.php3.38 ▲0.0244.69 ▼2.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.48 ▼11.42
Media Library /wp-admin/upload.php3.25 ▲0.0234.87 ▼1.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Admin Toolbar Menus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,759 ▲1314.47 ▼0.281.91 ▲0.2444.75 ▲2.20
Dashboard /wp-admin2,155 ▼335.84 ▲0.8093.49 ▼19.5337.52 ▼0.16
Posts /wp-admin/edit.php2,041 ▼481.99 ▼0.0532.74 ▼3.0333.25 ▲0.29
Add New Post /wp-admin/post-new.php1,488 ▼3517.45 ▼5.88682.31 ▲2.7353.46 ▼2.03
Media Library /wp-admin/upload.php1,340 ▼454.21 ▲0.0195.56 ▼18.2641.90 ▼7.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tested up to: Invalid version format
The official readme.txt might help

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

"Admin Toolbar Menus" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected176 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16279149
PO File14627

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ 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