10% comment-blacklist-updater

Code Review | Comment Blacklist Updater

WordPress plugin Comment Blacklist Updater scored10%from 54 tests.

About plugin

  • Plugin page: comment-blacklist...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Sep 26, 2023
  • Number of updates: 46
  • Update frequency: every 36.5 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /6,763 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function get_option was called with an argument that is deprecated since version 5.5.0! The "blacklist_keys" option key has been renamed to "disallowed_keys".

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.27ms] Passed 4 tests

Analyzing server-side resources used by Comment Blacklist Updater
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.96 ▼15.44
Dashboard /wp-admin3.40 ▲0.1051.50 ▼5.42
Posts /wp-admin/edit.php3.51 ▲0.1654.63 ▲3.91
Add New Post /wp-admin/post-new.php5.98 ▲0.09102.75 ▲1.72
Media Library /wp-admin/upload.php3.32 ▲0.0940.45 ▲2.07

Server storage [IO: ▲0.09MB] [DB: ▲0.70MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Comment Blacklist Updater: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.131.76 ▼0.2944.76 ▲2.48
Dashboard /wp-admin2,206 ▲184.87 ▼0.06108.46 ▲0.0941.81 ▲1.52
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0040.36 ▲1.0735.43 ▼1.38
Add New Post /wp-admin/post-new.php1,533 ▲1423.27 ▲0.11655.57 ▼24.5051.71 ▲2.44
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.0398.87 ▼19.4845.06 ▼2.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/comment-blacklist-updater/comment-blacklist-updater.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: You can look at the official readme.txt

comment-blacklist-updater/comment-blacklist-updater.php 92% from 13 tests

This is the main PHP file of "Comment Blacklist Updater" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 268 characters long)

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
Success! There were no dangerous files found in this plugin499 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22930336
PO File13031163

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.29
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods942.86%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin