88% better-admin-bar

Code Review | Better Admin Bar

WordPress plugin Better Admin Bar scored 88% from 53 tests.

About plugin

  • Plugin page: better-admin-bar
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Jun 16, 2014
  • Latest release: Oct 27, 2021
  • Number of updates: 89
  • Update frequency: every 30.5 days
  • Top authors: kubiq (100%)

Code review

53 tests

User reviews

16 reviews

Install metrics

5,000+ active / 38,452 total downloads

Benchmarks

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

This is a short check of server-side resources used by Better Admin Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1538.13 ▲17.70
Dashboard /wp-admin3.10 ▲0.0543.07 ▲0.44
Posts /wp-admin/edit.php3.15 ▲0.0537.32 ▼0.14
Add New Post /wp-admin/post-new.php5.46 ▲0.0488.76 ▼1,012.44
Media Library /wp-admin/upload.php3.04 ▲0.0431.13 ▼3.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Better Admin Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,680 ▲9815.90 ▼0.067.83 ▲0.3253.56 ▲6.39
Dashboard /wp-admin2,935 ▲825.89 ▲0.02134.90 ▲0.40101.38 ▼6.52
Posts /wp-admin/edit.php2,708 ▲22.69 ▼0.0070.92 ▲2.5487.85 ▼5.51
Add New Post /wp-admin/post-new.php1,656 ▲318.86 ▲0.14373.56 ▲10.97112.58 ▼3.13
Media Library /wp-admin/upload.php1,777 ▲24.97 ▼0.02146.84 ▲6.75110.89 ▼3.77
Better Admin Bar /wp-admin/better-admin-bar.php260.900.0510.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-bar/better-admin-bar.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/better-admin-bar.php
    • > Network (severe)
    wp-admin/better-admin-bar.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === better-admin-bar === )
The official readme.txt is a good inspiration

better-admin-bar/better-admin-bar.php 92% from 13 tests

This is the main PHP file of "Better Admin Bar" version 3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin306 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11310237
PO File2181869

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.78
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin