84% custom-adminbar-menus

Code Review | Custom Adminbar Menus

WordPress plugin Custom Adminbar Menus scored84%from 54 tests.

About plugin

  • Plugin page: custom-adminbar-m...
  • Plugin version: 19.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2012
  • Latest release: May 2, 2019
  • Number of updates: 59
  • Update frequency: every 42.6 days
  • Top authors: lineshjose (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /8,703 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.04MB] [CPU: ▼5.53ms] Passed 4 tests

A check of server-side resources used by Custom Adminbar Menus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.42 ▼6.86
Dashboard /wp-admin3.35 ▲0.0447.14 ▼1.98
Posts /wp-admin/edit.php3.40 ▲0.0449.00 ▲1.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.27 ▼11.71
Media Library /wp-admin/upload.php3.27 ▲0.0438.58 ▼1.55

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Custom Adminbar Menus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.58 ▼0.691.75 ▼0.1039.09 ▼8.34
Dashboard /wp-admin2,215 ▲444.85 ▼1.0597.30 ▼10.5939.54 ▲0.09
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0340.11 ▲5.2235.16 ▲1.63
Add New Post /wp-admin/post-new.php1,547 ▲1418.31 ▼5.19595.32 ▼2.5852.00 ▼4.42
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.1495.61 ▼8.9940.52 ▼1.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-adminbar-menus/index.php:27

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: custom adminbar menus, menu, adminbar, nav menu, lineshjose...

custom-adminbar-menus/index.php 92% from 13 tests

The entry point to "Custom Adminbar Menus" version 19.05 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-adminbar-menus.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin204 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11317204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin