78% black-lives-matter

Code Review | Black Lives Matter Widget

WordPress plugin Black Lives Matter Widget scored78%from 54 tests.

About plugin

  • Plugin page: black-lives-matter
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Jun 16, 2020
  • Latest release: Feb 1, 2022
  • Number of updates: 3
  • Update frequency: every 198.4 days
  • Top authors: atiqsamtia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.87ms] Passed 4 tests

A check of server-side resources used by Black Lives Matter Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.19 ▼13.30
Dashboard /wp-admin3.31 ▲0.0144.16 ▼5.16
Posts /wp-admin/edit.php3.36 ▲0.0148.09 ▼1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.15 ▼3.63
Media Library /wp-admin/upload.php3.23 ▲0.0135.07 ▼1.28
Black Lives Matter Widget /wp-admin/options-general.php?page=black-lives-matter3.2236.27

Server storage [IO: ▲0.02MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Black Lives Matter Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.24 ▼1.061.64 ▼0.1051.51 ▲4.39
Dashboard /wp-admin2,204 ▲165.80 ▲0.90101.58 ▼2.1844.66 ▲1.88
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0339.50 ▲1.4135.23 ▲1.65
Add New Post /wp-admin/post-new.php1,537 ▼023.08 ▼0.11584.79 ▼96.9451.37 ▼1.50
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0193.63 ▼16.0542.58 ▼4.88
Black Lives Matter Widget /wp-admin/options-general.php?page=black-lives-matter9722.0724.7565.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/black-lives-matter/index.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=black-lives-matter
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=black-lives-matter 192 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: solidarity message, blacklivesmatter, widget, alllivesmatter

black-lives-matter/index.php 85% from 13 tests

The main PHP file in "Black Lives Matter Widget" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("black-lives-matter.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected320 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34824113
SVG10099
CSS10090
Markdown19018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG files were detected