89% easy-anti-spam-bots

Code Review | Easy Anti Spam Bot

WordPress plugin Easy Anti Spam Bot scored89%from 54 tests.

About plugin

  • Plugin page: easy-anti-spam-bots
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2018
  • Latest release: Apr 11, 2022
  • Number of updates: 14
  • Update frequency: every 95.1 days
  • Top authors: cjperes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Easy Anti Spam Bot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.54 ▼2.78
Dashboard /wp-admin3.34 ▼0.0044.64 ▼18.21
Posts /wp-admin/edit.php3.39 ▲0.0442.77 ▼6.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.87 ▼11.16
Media Library /wp-admin/upload.php3.26 ▲0.0435.19 ▲2.03
Anti Spam Bot /wp-admin/options-general.php?page=e-anti-spam-bot3.2331.00

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Anti Spam Bot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6714.35 ▲0.071.63 ▲0.0342.52 ▲2.62
Dashboard /wp-admin2,219 ▲455.57 ▼0.0182.73 ▼21.2844.87 ▲1.65
Posts /wp-admin/edit.php2,125 ▲252.00 ▲0.0236.72 ▲1.1841.39 ▲7.28
Add New Post /wp-admin/post-new.php1,544 ▲1823.24 ▼0.01659.28 ▼15.7860.69 ▲7.05
Media Library /wp-admin/upload.php1,427 ▲304.25 ▲0.0195.22 ▼4.4146.94 ▼0.84
Anti Spam Bot /wp-admin/options-general.php?page=e-anti-spam-bot8082.0524.1132.58

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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

easy-anti-spam-bots/easy-anti-spam-bot.php 92% from 13 tests

The entry point to "Easy Anti Spam Bot" version 1.0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-anti-spam-bots.php" instead of "easy-anti-spam-bot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin964 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13181488748
Markdown2390110
JSON30082
JavaScript17324

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity18.17
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods2448.00%
▷ Public methods4896.00%
▷ Protected methods00.00%
▷ Private methods24.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin