83% black-ribbon-by-attawit

Code Review | Black Ribbon by Attawit

WordPress plugin Black Ribbon by Attawit scored83%from 54 tests.

About plugin

  • Plugin page: black-ribbon-by-a...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 31, 2016
  • Latest release: Oct 31, 2016
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: atton16 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,265 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Black Ribbon by Attawit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.10 ▲0.85
Dashboard /wp-admin3.35 ▲0.0149.53 ▼16.92
Posts /wp-admin/edit.php3.40 ▲0.0553.85 ▲4.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.15 ▼4.77
Media Library /wp-admin/upload.php3.27 ▲0.0540.00 ▲3.80
Black Ribbon /wp-admin/options-general.php?page=black-ribbon-by-attawit/blackribbon.php3.2432.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Black Ribbon by Attawit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.71 ▼0.875.36 ▲3.6444.60 ▲1.81
Dashboard /wp-admin2,223 ▲354.94 ▲0.05109.55 ▼0.7137.60 ▼5.02
Posts /wp-admin/edit.php2,106 ▲172.19 ▲0.1437.84 ▲0.5835.93 ▼0.04
Add New Post /wp-admin/post-new.php1,528 ▼1223.51 ▲4.94677.75 ▲57.0553.23 ▲1.01
Media Library /wp-admin/upload.php1,402 ▲114.36 ▲0.10112.13 ▲9.8848.77 ▲6.16
Black Ribbon /wp-admin/options-general.php?page=black-ribbon-by-attawit/blackribbon.php8931.8629.6930.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/black-ribbon-by-attawit/blackribbon.php:347

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

black-ribbon-by-attawit/blackribbon.php 77% from 13 tests

The main file in "Black Ribbon by Attawit" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("black-ribbon-by-attawit.php" instead of "blackribbon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,481 lines of code in 4 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
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/black_ribbon_bottom_left.png6.47KB3.47KB▼ 46.36%
images/black_ribbon_top_left.png6.38KB3.57KB▼ 43.95%
images/black_ribbon_bottom_right.png6.24KB3.50KB▼ 43.97%
images/black_ribbon_top_right.png6.46KB3.50KB▼ 45.89%