10% wp-black-ribbon

Code Review | WP Black Ribbon

WordPress plugin WP Black Ribbon scored10%from 54 tests.

About plugin

  • Plugin page: wp-black-ribbon
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2016
  • Latest release: Oct 21, 2016
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: dekkeng (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /853 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-black-ribbon/wp-black-ribbon.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; bbblackribbon has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼56.94ms] Passed 4 tests

A check of server-side resources used by WP Black Ribbon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.25 ▼37.07
Dashboard /wp-admin2.10 ▼1.205.87 ▼46.39
Posts /wp-admin/edit.php2.10 ▼1.266.87 ▼46.35
Add New Post /wp-admin/post-new.php2.10 ▼3.796.35 ▼97.96
Media Library /wp-admin/upload.php2.10 ▼1.137.01 ▼30.20
WP Black Ribbon /wp-admin/options-general.php?page=bbblackribbon_menu_id2.106.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Black Ribbon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.63 ▼0.964.47 ▲2.5640.65 ▼1.94
Dashboard /wp-admin2,210 ▲194.86 ▼0.00113.17 ▲3.1739.58 ▼2.53
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0041.27 ▲5.2436.49 ▼4.03
Add New Post /wp-admin/post-new.php1,536 ▲823.25 ▲4.96603.51 ▼48.2256.62 ▼20.22
Media Library /wp-admin/upload.php1,392 ▲104.27 ▲0.0296.00 ▼0.9342.91 ▼1.60
WP Black Ribbon /wp-admin/options-general.php?page=bbblackribbon_menu_id8032.2225.5328.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-black-ribbon/wp-black-ribbon.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; bbblackribbon has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=bbblackribbon_menu_id
    • > Deprecated in wp-content/plugins/wp-black-ribbon/wp-black-ribbon.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; bbblackribbon has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bbblackribbon_menu_id
    • > Notice in wp-content/plugins/wp-black-ribbon/admin_settings.php+34
    Trying to access array offset on value of type bool

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-black-ribbon/wp-black-ribbon.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-black-ribbon/admin_settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: black ribbon

wp-black-ribbon/wp-black-ribbon.php Passed 13 tests

The main file in "WP Black Ribbon" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
This is a plugin that insert black ribbon to your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21517175

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/blackribbon-bottom-left.png2.09KB1.06KB▼ 49.14%
images/blackribbon-top-left.png2.22KB1.07KB▼ 51.69%
images/blackribbon-top-right.png2.11KB1.08KB▼ 49.08%
images/blackribbon-bottom-right.png2.14KB1.05KB▼ 50.66%