84% wp-admin-bar-menus

Code Review | WP Adminbar Menus

WordPress plugin WP Adminbar Menus scored84%from 54 tests.

About plugin

  • Plugin page: wp-admin-bar-menus
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: Jan 4, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: afzalmultani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,019 total downloads

Benchmarks

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

Analyzing server-side resources used by WP Adminbar Menus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.22 ▼1.27
Dashboard /wp-admin3.32 ▲0.0145.91 ▲1.87
Posts /wp-admin/edit.php3.37 ▲0.0145.89 ▼1.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.32 ▼3.66
Media Library /wp-admin/upload.php3.24 ▲0.0136.71 ▲2.69

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Adminbar Menus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.14 ▼1.241.63 ▼0.2640.31 ▼1.11
Dashboard /wp-admin2,215 ▲274.83 ▼0.1899.45 ▼2.8540.95 ▼0.10
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0539.42 ▼2.2836.67 ▲1.68
Add New Post /wp-admin/post-new.php1,540 ▼223.18 ▲5.12609.40 ▲1.3957.13 ▲5.48
Media Library /wp-admin/upload.php1,397 ▲124.21 ▲0.01100.08 ▲4.9443.56 ▲3.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-admin-bar-menus/index.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Custom Menus.), #2 (More shortcut links.), #3 (Enable/Disable shortcut links.)
The official readme.txt might help

wp-admin-bar-menus/index.php 92% from 13 tests

The main file in "WP Adminbar Menus" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-admin-bar-menus.php" instead of "index.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
Success! There were no dangerous files found in this plugin190 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11316190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected