78% block-comment-spam-bots

Code Review | Block Comment Spam Bots

WordPress plugin Block Comment Spam Bots scored78%from 54 tests.

About plugin

  • Plugin page: block-comment-spa...
  • Plugin version: 2.62
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Aug 10, 2023
  • Number of updates: 38
  • Update frequency: every 35.0 days
  • Top authors: rhellewell@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,640 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼9.10MB] [CPU: ▼1,885,261.14ms] Passed 4 tests

A check of server-side resources used by Block Comment Spam Bots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▼36.5338.87 ▼7,541,027.75
Dashboard /wp-admin40.11 ▲0.017,551,683.35 ▲10,107.61
Posts /wp-admin/edit.php3.52 ▲0.1254.17 ▲1.92
Add New Post /wp-admin/post-new.php5.99 ▲0.0685.95 ▼20.92
Media Library /wp-admin/upload.php3.33 ▲0.0538.63 ▲2.21
Block Comment Spam Bots Info/Usage /wp-admin/options-general.php?page=bcsb_settings3.3137.64

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block Comment Spam Bots
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1614.58 ▲0.231.76 ▼0.3247.33 ▲2.95
Dashboard /wp-admin2,204 ▲305.62 ▲0.0493.74 ▼7.3135.85 ▼10.09
Posts /wp-admin/edit.php2,109 ▲122.03 ▲0.0840.22 ▲2.4132.26 ▼5.48
Add New Post /wp-admin/post-new.php1,531 ▲523.57 ▲0.59633.58 ▼87.4458.67 ▼3.55
Media Library /wp-admin/upload.php1,409 ▲94.20 ▲0.02100.62 ▼3.6839.02 ▼6.26
Block Comment Spam Bots Info/Usage /wp-admin/options-general.php?page=bcsb_settings1,0682.1125.3570.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bcsb_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bcsb_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/block-comment-spam-bots/block-comment-spam-bots.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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (No screenshots; no settings screen needed.) image required
Please take inspiration from this readme.txt

block-comment-spam-bots/block-comment-spam-bots.php Passed 13 tests

The main file in "Block Comment Spam Bots" v. 2.62 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Blocks spam bots from directly posting to wp-post-comments.php file.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin362 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP148111267
CSS16384
XML20011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 3.98MB with 3.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/cellarweb-logo-03.png914.86KB147.46KB▼ 83.88%
assets/curl-result.png4.43KB2.02KB▼ 54.31%
assets/banner-1000x200.png610.11KB84.36KB▼ 86.17%
assets/banner-772x250.png677.16KB84.43KB▼ 87.53%
assets/cellarweb-logo-2022.png954.49KB191.67KB▼ 79.92%