84% blackbar

Code Review | Black Bar

WordPress plugin Black Bar scored84%from 54 tests.

About plugin

  • Plugin page: blackbar
  • Plugin version: 4.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2018
  • Latest release: Oct 11, 2023
  • Number of updates: 36
  • Update frequency: every 57.2 days
  • Top authors: geminilabs (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /13,622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.83MB] [CPU: ▲37.91ms] Passed 4 tests

A check of server-side resources used by Black Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.37 ▲0.9173.09 ▲34.33
Dashboard /wp-admin4.17 ▲0.8282.95 ▲26.89
Posts /wp-admin/edit.php4.20 ▲0.8592.81 ▲40.71
Add New Post /wp-admin/post-new.php6.97 ▲1.08143.72 ▲49.69
Media Library /wp-admin/upload.php3.96 ▲0.7386.15 ▲52.00

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Black Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /11,500 ▲8,73915.45 ▲1.1033.57 ▲31.7837.69 ▼9.98
Dashboard /wp-admin7,409 ▲5,2296.47 ▲0.81144.17 ▲58.5944.11 ▲1.39
Posts /wp-admin/edit.php7,121 ▲5,0183.86 ▲1.8473.42 ▲30.3337.28 ▼2.27
Add New Post /wp-admin/post-new.php7,039 ▲5,51125.82 ▲2.71743.08 ▲66.2155.55 ▼5.10
Media Library /wp-admin/upload.php4,971 ▲3,5775.48 ▲1.27123.84 ▲28.8842.72 ▲1.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Hooks.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Console.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Globals.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Profiler.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Queries.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeminiLabs\\BlackBar\\Modules\\Module' not found in wp-content/plugins/blackbar/plugin/Modules/Templates.php:5

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: blackbox, debugbar, black bar, development, debugging...

blackbar/blackbar.php 85% from 13 tests

"Black Bar" version 4.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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
There were no executable files found in this plugin1,265 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP211211601,149
PO File14143113
JavaScript1042
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.64
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes110.00%
Methods79
▷ Static methods11.27%
▷ Public methods5974.68%
▷ Protected methods2025.32%
▷ Private methods00.00%
Functions11
▷ Named functions19.09%
▷ Anonymous functions1090.91%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin