84% botscout-comment-protection

Code Review | BotScout Comment Protection

WordPress plugin BotScout Comment Protection scored84%from 54 tests.

About plugin

  • Plugin page: botscout-comment-...
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Jan 17, 2015
  • Number of updates: 6
  • Update frequency: every 29.3 days
  • Top authors: jp2112 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,091 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼11.62ms] Passed 4 tests

Server-side resources used by BotScout Comment Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.56 ▼0.37
Dashboard /wp-admin3.38 ▲0.0446.57 ▼18.54
Posts /wp-admin/edit.php3.50 ▲0.1451.04 ▼0.51
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.20 ▼24.46
Media Library /wp-admin/upload.php3.31 ▲0.0834.29 ▼2.96
BotScout Comment Protection /wp-admin/options-general.php?page=botscout-comment-protection3.2733.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BotScout Comment Protection
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.73 ▲0.371.81 ▲0.1145.62 ▲1.74
Dashboard /wp-admin2,202 ▲255.69 ▲0.0485.92 ▼2.1238.84 ▼10.01
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0334.34 ▼3.9829.73 ▼6.77
Add New Post /wp-admin/post-new.php1,545 ▲523.25 ▲5.06658.36 ▲23.8555.20 ▲1.99
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.00100.44 ▼6.2542.53 ▼7.59
BotScout Comment Protection /wp-admin/options-general.php?page=botscout-comment-protection8832.2126.0140.13

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 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/botscout-comment-protection/botscout-comment-protection.php:23

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: comment, antispam, botscout

botscout-comment-protection/botscout-comment-protection.php Passed 13 tests

The primary PHP file in "BotScout Comment Protection" version 0.0.6 is used by WordPress to initiate all plugin functionality
80 characters long description:
Pass comments through the BotScout API and flag spam comments where appropriate.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin303 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31658298
CSS1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prot.png3.52KB2.93KB▼ 16.76%
images/settings.png2.11KB2.31KB0.00%
images/support.png5.03KB2.79KB▼ 44.54%