84% wpc-antispambot

Code Review | WPC - Antispam Bot

WordPress plugin WPC - Antispam Bot scored 84% from 54 tests.

About plugin

  • Plugin page: wpc-antispambot
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Jan 30, 2020
  • Latest release: May 16, 2021
  • Number of updates: 10
  • Update frequency: every 47.4 days
  • Top authors: wpclinique (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,463 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.00MB] [CPU: ▼4.90ms] Passed 4 tests

An overview of server-side resources used by WPC - Antispam Bot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.21 ▲0.70
Dashboard /wp-admin3.31 ▲0.0146.32 ▼7.11
Posts /wp-admin/edit.php3.36 ▲0.0043.70 ▼1.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.60 ▼11.53
Media Library /wp-admin/upload.php3.23 ▲0.0036.08 ▲1.62

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WPC - Antispam Bot: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.381.75 ▼0.0344.26 ▲1.65
Dashboard /wp-admin2,206 ▲185.01 ▲0.05111.62 ▲6.4944.61 ▲3.83
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0133.37 ▼3.9533.86 ▲2.06
Add New Post /wp-admin/post-new.php1,533 ▼023.15 ▼0.21675.39 ▲7.4252.31 ▼12.78
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0193.61 ▼9.5041.95 ▼1.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wpc-antispambot/wpcantispambot.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wpc-antispambot === )
You can take inspiration from this readme.txt

wpc-antispambot/wpcantispambot.php 92% from 13 tests

The entry point to "WPC - Antispam Bot" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpc-antispambot.php" instead of "wpcantispambot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13910

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code1.00
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin