84% breaking-bar

Code Review | Breaking Bar

WordPress plugin Breaking Bar scored 84% from 54 tests.

About plugin

  • Plugin page: breaking-bar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.2
  • WordPress version: 5.8.1
  • First release: Sep 4, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: edeneye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,564 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼141.95ms] Passed 4 tests

Analyzing server-side resources used by Breaking Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1927.36 ▲6.70
Dashboard /wp-admin3.15 ▲0.0943.78 ▼1.71
Posts /wp-admin/edit.php3.26 ▲0.1539.10 ▼1.70
Add New Post /wp-admin/post-new.php5.50 ▲0.0788.55 ▼556.93
Media Library /wp-admin/upload.php3.09 ▲0.0828.23 ▼7.44
Breaking Bar /wp-admin/options-general.php?page=breaking-bar3.0731.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Breaking Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13116.19 ▲0.639.28 ▼1.3647.39 ▼2.74
Dashboard /wp-admin2,989 ▲586.63 ▲0.72140.05 ▼5.92109.29 ▼0.62
Posts /wp-admin/edit.php2,761 ▲222.78 ▲0.0759.63 ▼8.8893.83 ▲4.75
Add New Post /wp-admin/post-new.php1,643 ▲14522.64 ▲3.82274.65 ▼113.21129.00 ▲17.61
Media Library /wp-admin/upload.php1,836 ▲295.38 ▲0.35124.59 ▼30.69120.81 ▲0.88
Breaking Bar /wp-admin/options-general.php?page=breaking-bar1,6853.1182.8582.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • breaking_bar_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/breaking-bar/admin/partials/breaking-bar-admin-display.php:18

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, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Coming Soon) image missing
  • Plugin Name: You should set the name of your plugin on the first line ( === breaking-bar === )
The official readme.txt is a good inspiration

breaking-bar/breaking-bar.php Passed 13 tests

The main PHP script in "Breaking Bar" version 1.0.0 is automatically included on every request by WordPress
58 characters long description:
A simple breaking news bar that monitors a chosen category

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin377 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin