94% wp-hello-bar

Code Review | WP Hello Bar

WordPress plugin WP Hello Bar scored 94% from 54 tests.

About plugin

  • Plugin page: wp-hello-bar
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4.2
  • WordPress version: 5.8.1
  • First release: Sep 19, 2012
  • Latest release: Dec 30, 2012
  • Number of updates: 3
  • Update frequency: every 34.0 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 14,516 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼137.07ms] Passed 4 tests

An overview of server-side resources used by WP Hello Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1427.15 ▲5.55
Dashboard /wp-admin3.09 ▲0.0350.04 ▲5.87
Posts /wp-admin/edit.php3.14 ▲0.0343.59 ▲3.62
Add New Post /wp-admin/post-new.php5.44 ▲0.0189.27 ▼563.31
Media Library /wp-admin/upload.php3.03 ▲0.0334.64 ▲8.54
HelloBar Settings /wp-admin/options-general.php?page=hb-settings3.0027.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Hello Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,687 ▲9115.82 ▲0.299.14 ▲1.7648.73 ▼3.76
Dashboard /wp-admin2,978 ▲415.85 ▼0.28141.88 ▼11.25110.13 ▼4.60
Posts /wp-admin/edit.php2,747 ▲82.69 ▲0.0170.49 ▲0.9391.48 ▼2.35
Add New Post /wp-admin/post-new.php1,506 ▼17718.60 ▼0.05363.44 ▲0.00106.88 ▼7.23
Media Library /wp-admin/upload.php1,815 ▲55.00 ▼0.02149.14 ▲5.50124.11 ▲3.60
HelloBar Settings /wp-admin/options-general.php?page=hb-settings1,1592.1856.2581.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 no errors were found, this is by no means an exhaustive test

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
  • 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/wp-hello-bar/wp-hello-bar.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: hello bar, notification bar, hellobar

wp-hello-bar/wp-hello-bar.php Passed 13 tests

The principal PHP file in "WP Hello Bar" v. 1.02 is loaded by WordPress automatically on each request
42 characters long description:
Insert the HelloBar on your WordPress site

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
No dangerous file extensions were detected113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16282113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/img/hellobar-icon.png1.36KB1.61KB0.00%