78% antibots

Code Review | WordPress Stop and Block bots plugin Anti bots

WordPress plugin WordPress Stop and Block bots plugin Anti bots scored78%from 54 tests.

About plugin

  • Plugin page: antibots
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Oct 17, 2023
  • Number of updates: 90
  • Update frequency: every 14.5 days
  • Top authors: sminozzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.47MB] [CPU: ▼6.38ms] Passed 4 tests

An overview of server-side resources used by WordPress Stop and Block bots plugin Anti bots
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5443.43 ▼0.72
Dashboard /wp-admin3.81 ▲0.4655.09 ▼10.91
Posts /wp-admin/edit.php3.86 ▲0.5050.77 ▲0.84
Add New Post /wp-admin/post-new.php6.34 ▲0.4688.69 ▼2.57
Media Library /wp-admin/upload.php3.67 ▲0.4441.90 ▼11.32
Dashboard /wp-admin/admin.php?page=anti_bots_plugin3.6639.65
Settings /wp-admin/admin.php?page=settings-anti-bots3.6436.52
Visits Log /wp-admin/admin.php?page=antibots_my-custom-submenu-page3.6436.74

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: 2 new tables, 11 new options
New tables
wp_antibots_visitorslog
wp_antibots_fingerprint
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
antibots_installed
widget_recent-posts
widget_recent-comments
antibots_string_whitelist
antibots_version
antibots_was_activated
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Stop and Block bots plugin Anti bots
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲13614.33 ▼0.041.79 ▼0.3543.47 ▲0.50
Dashboard /wp-admin2,269 ▲955.68 ▲0.11108.34 ▲2.1770.92 ▲24.98
Posts /wp-admin/edit.php2,188 ▲882.75 ▲0.7744.92 ▲7.6175.70 ▲39.92
Add New Post /wp-admin/post-new.php1,611 ▲8523.79 ▲0.39661.00 ▼122.3137.25 ▼22.13
Media Library /wp-admin/upload.php1,480 ▲835.14 ▲0.96108.95 ▼68.7386.83 ▲23.39
Dashboard /wp-admin/admin.php?page=anti_bots_plugin1,1222.4231.3245.86
Settings /wp-admin/admin.php?page=settings-anti-bots1,0352.5631.2343.12
Visits Log /wp-admin/admin.php?page=antibots_my-custom-submenu-page1,4563.0550.8139.93

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • bill_show_warnings
    • antibots_string_whitelist

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/antibots/includes/checkup/class_bill_catch_errors.php
    • > /wp-content/plugins/antibots/includes/checkup/bill_class_diagnose.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'AntibotsWPSettings\\antibot_Page' not found in wp-content/plugins/antibots/settings/options/plugin_options_tabbed.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Visitors's log table), #2 (Dashboard), #3 (Settings Page)
The official readme.txt is a good inspiration

antibots/antibot.php 92% from 13 tests

The main PHP script in "WordPress Stop and Block bots plugin Anti bots" version 1.11 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("antibots.php" instead of "antibot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected7,127 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP304224833,945
CSS5179621,726
JavaScript122491731,173
PO File1107109283

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.81
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods85
▷ Static methods89.41%
▷ Public methods8397.65%
▷ Protected methods00.00%
▷ Private methods22.35%
Functions48
▷ Named functions4797.92%
▷ Anonymous functions12.08%
Constants8
▷ Global constants8100.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
18 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png26.23KB9.99KB▼ 61.91%
assets/images/info.png1.49KB1.28KB▼ 14.32%
assets/images/protect.png0.30KB0.15KB▼ 48.20%
includes/checkup/bell.png1.07KB0.27KB▼ 74.45%
assets/images/sort_asc_disabled.png0.14KB0.25KB0.00%