72% wp-admin-bar-control

Code Review | WP Admin Bar Control

WordPress plugin WP Admin Bar Control scored 72% from 54 tests.

About plugin

  • Plugin page: wp-admin-bar-control
  • Plugin version: 0.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.1.1
  • WordPress version: 5.8.1
  • First release: Feb 1, 2017
  • Latest release: Apr 18, 2019
  • Number of updates: 35
  • Update frequency: every 22.9 days
  • Top authors: evilex (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 6,381 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼154.87ms] Passed 4 tests

This is a short check of server-side resources used by WP Admin Bar Control
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0223.44 ▲1.24
Dashboard /wp-admin2.99 ▼0.0820.32 ▼16.85
Posts /wp-admin/edit.php3.04 ▼0.0726.53 ▼3.20
Add New Post /wp-admin/post-new.php4.99 ▼0.4562.28 ▼593.20
Media Library /wp-admin/upload.php2.99 ▼0.0119.91 ▼6.23
Yummi Plugins /wp-admin/admin.php?page=yummi2.9718.68
Admin Bar Control /wp-admin/admin.php?page=wpabc2.9719.90

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
wpabc

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Admin Bar Control
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲16615.62 ▼0.275.51 ▲0.7175.74 ▲0.14
Dashboard /wp-admin3,030 ▲1346.13 ▼0.05117.38 ▼12.63188.22 ▲17.33
Posts /wp-admin/edit.php2,838 ▲983.04 ▼0.1963.11 ▼2.74143.08 ▲1.91
Add New Post /wp-admin/post-new.php3,881 ▲18218.90 ▲0.39440.44 ▼18.91187.97 ▲10.53
Media Library /wp-admin/upload.php1,848 ▲965.57 ▲0.09134.07 ▼11.93210.66 ▲31.32
Yummi Plugins /wp-admin/admin.php?page=yummi2,6208.46213.97218.36
Admin Bar Control /wp-admin/admin.php?page=wpabc2,4743.9086.72201.31

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • wpabc

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpabc
    • > User notice in wp-includes/functions.php+5663
    WP_Admin_Bar::add_node was called incorrectly. The menu ID should not be empty. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=yummi
    • > Notice in wp-content/plugins/wp-admin-bar-control/includes/yummi-plugins.php+117
    Undefined variable: tab

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-admin-bar-control/wp-admin-bar-control.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/wp-admin-bar-control/includes/yummi-plugins.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=yummi
    • > Network (severe)
    https://www.paypalobjects.com/en_IT/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: admin, hidden, plugins, switch, plugin...

wp-admin-bar-control/wp-admin-bar-control.php 85% from 13 tests

"WP Admin Bar Control" version 0.9.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 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 plugin1,357 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31812681,131
CSS213226

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 150)
Cyclomatic complexity
Average complexity per logical line of code1.22
Average class complexity247.00
▷ Minimum class complexity247.00
▷ Maximum class complexity247.00
Average method complexity21.22
▷ Minimum method complexity1.00
▷ Maximum method complexity150.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/dashicons-yummi.png1.81KB0.85KB▼ 52.89%