93% black-ribbon

Code Review | Black Ribbon

WordPress plugin Black Ribbon scored 93% from 54 tests.

About plugin

  • Plugin page: black-ribbon
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 5.8.1
  • First release: Oct 25, 2016
  • Latest release: Aug 4, 2020
  • Number of updates: 13
  • Update frequency: every 106.1 days
  • Top authors: jojoee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 7,883 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼139.23ms] Passed 4 tests

A check of server-side resources used by Black Ribbon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0533.03 ▼1.36
Dashboard /wp-admin3.11 ▲0.0665.28 ▲11.39
Posts /wp-admin/edit.php3.20 ▲0.0955.32 ▲10.99
Add New Post /wp-admin/post-new.php5.47 ▲0.04103.07 ▼570.23
Media Library /wp-admin/upload.php3.05 ▲0.0537.03 ▲3.69
Black Ribbon /wp-admin/options-general.php?page=black-ribbon3.0228.82

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Black Ribbon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲16815.89 ▲0.049.88 ▼0.7746.12 ▼7.38
Dashboard /wp-admin2,975 ▲416.06 ▲0.06145.85 ▼13.43119.92 ▲6.21
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0193.73 ▲22.1596.63 ▲6.20
Add New Post /wp-admin/post-new.php1,686 ▲10518.86 ▼1.63429.42 ▼0.64109.40 ▼11.93
Media Library /wp-admin/upload.php1,812 ▲795.02 ▲0.00190.18 ▲34.93117.71 ▼3.50
Black Ribbon /wp-admin/options-general.php?page=black-ribbon1,0982.0959.7587.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/black-ribbon/black-ribbon.php:14

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: Add images for these screenshots: #1 (Demo (screenshot-1.jpg)), #2 (Theme option (screenshot-2.jpg))
The official readme.txt is a good inspiration

black-ribbon/black-ribbon.php 92% from 13 tests

The main file in "Black Ribbon" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected526 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1568.18%
▷ Protected methods00.00%
▷ Private methods731.82%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
No PNG images were found in this plugin