84% black-lives-matter-solidarity-banner

Code Review | Black Lives Matter Solidarity Banner

WordPress plugin Black Lives Matter Solidarity Banner scored 84% from 54 tests.

About plugin

  • Plugin page: black-lives-matte...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Jun 18, 2020
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: mandeeya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.00ms] Passed 4 tests

A check of server-side resources used by Black Lives Matter Solidarity Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.97 ▼2.09
Dashboard /wp-admin3.31 ▲0.0148.60 ▼2.19
Posts /wp-admin/edit.php3.36 ▲0.0043.13 ▼2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.72 ▼13.11
Media Library /wp-admin/upload.php3.23 ▲0.0036.19 ▲1.66

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Black Lives Matter Solidarity Banner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.29 ▼1.101.93 ▲0.2942.68 ▼2.37
Dashboard /wp-admin2,203 ▲215.82 ▼0.0396.42 ▼3.2441.64 ▼3.89
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.1533.47 ▼9.4629.91 ▼8.30
Add New Post /wp-admin/post-new.php1,537 ▲323.20 ▲0.25656.39 ▼55.1355.12 ▼1.44
Media Library /wp-admin/upload.php1,388 ▲64.21 ▼0.03103.88 ▲5.0343.34 ▲1.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/black-lives-matter-solidarity-banner/black-lives-matter-solidarity-banner.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/black-lives-matter-solidarity-banner/includes/blm-functions.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: blm, black, black lives matter, black lives, anti racism

black-lives-matter-solidarity-banner/black-lives-matter-solidarity-banner.php Passed 13 tests

The entry point to "Black Lives Matter Solidarity Banner" version 1.0.1 is a PHP file that has certain tags in its header comment area
139 characters long description:
A plugin to display a Black Lives Matter Banner with links to stay informed and to support an initiative for promoting equality and equity.

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
Good job! No executable or dangerous file extensions detected53 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP373930
CSS13023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/screenshots/screenshot-1.png59.98KB14.48KB▼ 75.86%