94% antispam-bot

Code Review | Antispambot

WordPress plugin Antispambot scored 94% from 54 tests.

About plugin

  • Plugin page: antispam-bot
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.1
  • WordPress version: 5.9.2
  • First release: Nov 2, 2013
  • Latest release: Apr 25, 2021
  • Number of updates: 9
  • Update frequency: every 303.4 days
  • Top authors: iniyan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,198 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼297.59ms] Passed 4 tests

This is a short check of server-side resources used by Antispambot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.88 ▼1.14
Dashboard /wp-admin3.42 ▲0.0141.78 ▲5.93
Posts /wp-admin/edit.php3.65 ▲0.0137.38 ▲0.26
Add New Post /wp-admin/post-new.php6.89 ▼0.0993.34 ▼1,188.03
Media Library /wp-admin/upload.php3.30 ▲0.0025.11 ▼1.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Antispambot: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7315.83 ▼0.215.94 ▼0.092.26 ▼0.52
Dashboard /wp-admin2,892 ▲416.11 ▼0.06118.45 ▼17.78165.86 ▼2.03
Posts /wp-admin/edit.php2,691 ▲73.25 ▼0.0161.67 ▼21.45146.97 ▼45.08
Add New Post /wp-admin/post-new.php1,661 ▼015.98 ▲0.01440.35 ▼11.33189.69 ▲27.75
Media Library /wp-admin/upload.php1,698 ▲35.53 ▲0.02142.91 ▼9.16204.42 ▼31.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/antispam-bot/antispambot.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

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
5 plugin tags: antispam bot, email, antispambot, spam, antispam

antispam-bot/antispambot.php 85% from 13 tests

The entry point to "Antispambot" version 1.2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("antispam-bot.php" instead of "antispambot.php")
  • Description: The description should be shorter than 140 characters (currently 158 characters long)

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
There were no executable files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161311

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin