78% admin-bar-fix

Code Review | Admin Bar Fix

WordPress plugin Admin Bar Fix scored78%from 54 tests.

About plugin

  • Plugin page: admin-bar-fix
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 7, 2022
  • Latest release: Aug 11, 2023
  • Number of updates: 13
  • Update frequency: every 30.8 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /1,426 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.07MB] [CPU: ▼6.28ms] Passed 4 tests

Analyzing server-side resources used by Admin Bar Fix
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.41 ▼4.02
Dashboard /wp-admin3.37 ▲0.0749.40 ▼3.40
Posts /wp-admin/edit.php3.43 ▲0.0751.11 ▲0.76
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.99 ▼15.54
Media Library /wp-admin/upload.php3.30 ▲0.0736.33 ▼2.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar Fix
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.37 ▲0.022.01 ▲0.2743.52 ▼0.02
Dashboard /wp-admin2,202 ▲225.62 ▲0.0685.99 ▼15.2643.47 ▲4.63
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0338.88 ▼0.3340.27 ▲4.82
Add New Post /wp-admin/post-new.php1,531 ▼423.14 ▲4.70627.73 ▼42.6361.18 ▼15.12
Media Library /wp-admin/upload.php1,404 ▲74.14 ▼0.1095.52 ▼15.9842.73 ▼2.73
Admin Bar Fix /wp-admin/admin-bar-fix.php260.420.1713.35

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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 take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/admin-bar-fix/styles/icon.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/admin-bar-fix/styles/vertical.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/admin-bar-fix/styles/ghost.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/admin-bar-fix/styles/bottom.php:4

User-side errors 0% from 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: margin, adjustment, adminbar, fix, enhancement...

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

"Admin Bar Fix" version 2.3'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:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin535 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52418481
PO File1171954

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity14.50
▷ Minimum method complexity8.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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
No PNG images were found in this plugin