78% botnet-attack-blocker

Code Review | Botnet Attack Blocker

WordPress plugin Botnet Attack Blocker scored78%from 54 tests.

About plugin

  • Plugin page: botnet-attack-blo...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Apr 30, 2013
  • Latest release: May 12, 2017
  • Number of updates: 40
  • Update frequency: every 36.8 days
  • Top authors: cheesefather (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /24,331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.43ms] Passed 4 tests

An overview of server-side resources used by Botnet Attack Blocker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.73 ▲4.60
Dashboard /wp-admin3.34 ▲0.0445.38 ▼6.47
Posts /wp-admin/edit.php3.39 ▲0.0445.98 ▲3.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.34 ▼7.21
Media Library /wp-admin/upload.php3.26 ▲0.0436.51 ▲4.80
Botnet Blocker /wp-admin/options-general.php?page=bab3.2131.15

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: 1 new table, 8 new options
New tables
wp_botnetblocker
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
bab_options
widget_recent-comments
bab_db_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Botnet Attack Blocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.32 ▼0.031.71 ▲0.1142.11 ▼4.93
Dashboard /wp-admin2,199 ▲225.64 ▼0.0291.54 ▲3.4841.89 ▲0.27
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0341.59 ▲0.4639.12 ▲1.58
Add New Post /wp-admin/post-new.php1,529 ▲323.26 ▼0.13682.87 ▲5.2252.69 ▲2.35
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.01106.07 ▲0.0746.38 ▲3.60
Botnet Blocker /wp-admin/options-general.php?page=bab1,2452.0022.9133.02

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=bab
    • > Notice in wp-content/plugins/botnet-attack-blocker/botnet-attack-blocker.php+267
    Undefined offset: 0
    • > GET request to /wp-admin/options-general.php?page=bab
    • > Notice in wp-content/plugins/botnet-attack-blocker/botnet-attack-blocker.php+267
    Trying to get property 'timestamp' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/botnet-attack-blocker/botnet-attack-blocker.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === botnet-attack-blocker === )
  • Screenshots: Please add an image for screenshot #1 (Simple admin screen to change plugin options.)
You can look at the official readme.txt

botnet-attack-blocker/botnet-attack-blocker.php Passed 13 tests

The entry point to "Botnet Attack Blocker" version 2.0.0 is a PHP file that has certain tags in its header comment area
139 characters long description:
Temporarily block all admin logins after multiple failed attempts - helps to prevent brute force botnet attacks from multiple IP addresses.

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
No dangerous file extensions were detected693 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File5135135405
PHP11129288

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin