10% botbanish-firewall-client

Code Review | BotBanish by Randem Systems

WordPress plugin BotBanish by Randem Systems scored10%from 54 tests.

About plugin

  • Plugin page: botbanish-firewal...
  • Plugin version: 4.1.04
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2018
  • Latest release: Jul 5, 2023
  • Number of updates: 150
  • Update frequency: every 12.6 days
  • Top authors: randem06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,609 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs_DB_Website.php+309
    trim() expects parameter 1 to be string, array given

Server metrics [RAM: ▲2.83MB] [CPU: ▲23.13ms] Passed 4 tests

A check of server-side resources used by BotBanish by Randem Systems
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.30 ▲2.8475.81 ▲34.63
Dashboard /wp-admin6.17 ▲2.8676.59 ▲19.99
Posts /wp-admin/edit.php6.22 ▲2.8674.87 ▲25.73
Add New Post /wp-admin/post-new.php8.68 ▲2.80117.53 ▲12.18
Media Library /wp-admin/upload.php6.03 ▲2.8081.40 ▲43.59
Download Tables /wp-admin/admin.php?page=botbanishfirewall-download6.24207.82
Settings /wp-admin/admin.php?page=botbanishfirewall-client5.9958.23
View Logs /wp-admin/admin.php?page=botbanishfirewall-viewlogs6.0262.38
Analytics /wp-admin/admin.php?page=botbanishfirewall-analytics6.5764.63
Help /wp-admin/admin.php?page=botbanishfirewall-help5.9960.60

Server storage [IO: ▲4.54MB] [DB: ▲0.21MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification detected: 34 files (406.33KB) outside of "wp-content/plugins/botbanish-firewall-client/" and "wp-content/uploads/"
    • (new file) favicon-16x16.png
    • (new file) .htaccess102200
    • (new file) android-chrome-192x192.png
    • (new file) data/wp.com/potrivit-data_2023-10-12_.sql.gz
    • (new file) BotBanishRootIndex.php
    • (new file) BotBanish_RegisterAccount.html
    • (new file) apple-touch-icon.png
    • (new file) android-chrome-512x512.png
    • (modified) .htaccess
    • (new file) AddCountry.log
    • ...
Filesystem: 585 new files
Database: 17 new tables, 7 new options
New tables
bbc_botbanishclient_htaccess
bbc_botbanishclient_ip
bbc_botbanishclient_spiders_good
bbc_botbanishclient_spiders_bad
bbc_botbanish_language_text
bbc_botbanishclient_website_downloads
bbc_botbanishclient_website_visits
bbc_botbanish_language
bbc_botbanishclient_doc_errors
bbc_botbanishclient_ip_dnb
...
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
botbanishfirewall_client_option_name

Browser metrics Passed 4 tests

BotBanish by Randem Systems: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.43 ▲0.031.75 ▼0.3044.01 ▲1.94
Dashboard /wp-admin2,238 ▲474.87 ▼0.02108.93 ▼4.9343.55 ▼3.33
Posts /wp-admin/edit.php2,124 ▲351.99 ▼0.0635.67 ▼5.1131.29 ▼8.90
Add New Post /wp-admin/post-new.php1,564 ▲5022.06 ▲4.41669.14 ▲60.3856.95 ▲2.30
Media Library /wp-admin/upload.php1,426 ▲384.22 ▼0.05102.68 ▼2.2143.24 ▼4.45
Download Tables /wp-admin/admin.php?page=botbanishfirewall-download7982.2234.5828.64
Settings /wp-admin/admin.php?page=botbanishfirewall-client9462.0326.1028.07
View Logs /wp-admin/admin.php?page=botbanishfirewall-viewlogs9932.0523.7828.05
Analytics /wp-admin/admin.php?page=botbanishfirewall-analytics1,6782.0622.7028.35
Help /wp-admin/admin.php?page=botbanishfirewall-help7091.377.7822.19

Uninstaller [IO: ▲0.37MB] [DB: ▲0.21MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 17 tables in the database
    • bbc_botbanishclient_website_downloads
    • bbc_botbanishclient_website_visits
    • bbc_botbanishclient_domain_bad
    • bbc_botbanishclient_url_dnc
    • bbc_botbanishclient_ip
    • bbc_botbanishclient_spiders_bad
    • bbc_botbanishclient_settings
    • bbc_botbanish_language
    • bbc_botbanishclient_htaccess
    • bbc_botbanishclient_domain_good
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 123× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/parser/issue60.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/creator/count_distinct.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/parser/issue33.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/creator/issue101.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/parser/issue38.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/creator/insert.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/parser/issue55.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/tests/cases/parser/nested.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/Analytics/BotBanishDownload.php
    • > /wp-content/plugins/botbanish-firewall-client/bot/Client/BotBanishClient.php
  • 261× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: as in wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/src/builders/CreateTableSelectOptionBuilder.php on line 59
    • > PHP Notice
      Undefined index: as in wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/src/builders/CreateTableSelectOptionBuilder.php on line 59
    • > PHP Notice
      unserialize(): Error at offset 132 of 143 bytes in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs.php on line 3055
    • > PHP Notice
      Undefined index: as in wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/src/builders/CreateTableSelectOptionBuilder.php on line 59
    • > PHP Notice
      Undefined index: duplicates in wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/src/builders/CreateTableSelectOptionBuilder.php on line 58
    • > PHP Notice
      Undefined index: duplicates in wp-content/plugins/botbanish-firewall-client/bot/vendor/PHP-SQL-Parser/src/builders/CreateTableSelectOptionBuilder.php on line 58
    • > PHP Notice
      Undefined index: location in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs.php on line 880
    • > PHP Notice
      Undefined index: php_error in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs.php on line 791
    • > PHP Notice
      Undefined index: cause in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs.php on line 946
    • > PHP Notice
      Undefined index: called_from in wp-content/plugins/botbanish-firewall-client/bot/Subs/BotBanish_Subs.php on line 811

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=botbanishfirewall-analytics
    • > Network (severe)
    wp-content/plugins/botbanish-firewall-client/Analytics/css/BotBanishAnalytics.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (None)
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

botbanish-firewall-client/BotBanish.php 85% from 13 tests

The entry point to "BotBanish by Randem Systems" version 4.1.04 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 ("botbanish-firewall-client.php" instead of "BotBanish.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 265 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin28,955 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
PHP2977,81110,17527,022
CSS2432801
SQL58114233371
HTML280341
XML441289
JavaScript1439106
JSON10025

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 167)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.78
▷ Minimum class complexity1.00
▷ Maximum class complexity554.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity167.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes130
▷ Abstract classes10.77%
▷ Concrete classes12999.23%
▷ Final classes00.00%
Methods526
▷ Static methods112.09%
▷ Public methods26850.95%
▷ Protected methods24546.58%
▷ Private methods132.47%
Functions403
▷ Named functions40199.50%
▷ Anonymous functions20.50%
Constants176
▷ Global constants12269.32%
▷ Class constants5430.68%
▷ Public constants54100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.63MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bot/Images/install/banner.png108.99KB28.26KB▼ 74.07%
bot/Images/icons/BotBanish.png4.26KB1.09KB▼ 74.49%
bot/favicon-16x16.png0.78KB0.82KB0.00%
bot/Images/icons/favicon-16x16.png0.78KB0.82KB0.00%
bot/Images/icons/android-chrome-192x192.png38.36KB11.90KB▼ 68.99%