94% hellobar

Code Review | Hello Bar

WordPress plugin Hello Bar scored 94% from 54 tests.

About plugin

  • Plugin page: hellobar
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-5.8
  • WordPress version: 5.8.1
  • First release: Jan 7, 2011
  • Latest release: Aug 2, 2021
  • Number of updates: 37
  • Update frequency: every 104.6 days
  • Top authors: hellobar (56.76%)dtelepathy (21.62%)larslofgren (16.22%)christopherllai (13.51%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10,000+ active / 164,279 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Hello Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1536.39 ▲13.71
Dashboard /wp-admin3.09 ▲0.0446.50 ▲6.49
Posts /wp-admin/edit.php3.14 ▲0.0443.61 ▼9.02
Add New Post /wp-admin/post-new.php5.45 ▲0.0295.15 ▼577.40
Media Library /wp-admin/upload.php3.04 ▲0.0336.87 ▲2.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Hello Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13115.55 ▼0.3412.11 ▲1.1751.35 ▲0.08
Dashboard /wp-admin2,979 ▲485.88 ▼0.06153.94 ▲2.02134.19 ▲14.60
Posts /wp-admin/edit.php2,773 ▲372.69 ▼0.0070.53 ▲0.84104.97 ▼1.20
Add New Post /wp-admin/post-new.php1,604 ▼7918.60 ▼0.08413.64 ▲17.61117.27 ▼7.58
Media Library /wp-admin/upload.php1,764 ▼434.99 ▼0.01145.71 ▼13.05154.92 ▲26.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/hellobar/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hellobar/hellobar.php:211

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (The Hello Bar for WordPress interface. A dead simple place to put your HelloBar code.)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

hellobar/hellobar.php Passed 13 tests

"Hello Bar" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
94 characters long description:
The Original Popup Software (Top Bars, Exit Intents, Sliders, & More to Grow Your Email List!)

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 detected253 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2029233
SVG10116
CSS1002
JavaScript1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
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
5 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/q.png0.94KB0.74KB▼ 21.46%
images/icon2.png0.64KB0.73KB0.00%
images/icon.png1.69KB0.94KB▼ 44.66%
images/logo.png4.99KB2.53KB▼ 49.33%
images/demo.png110.23KB37.00KB▼ 66.43%