84% automatically-ban-ips

Code Review | Automatically Ban IPs

WordPress plugin Automatically Ban IPs scored 84% from 54 tests.

About plugin

  • Plugin page: automatically-ban...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Jun 13, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: qdinar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.28ms] Passed 4 tests

A check of server-side resources used by Automatically Ban IPs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼0.73
Dashboard /wp-admin3.31 ▲0.0148.39 ▼3.35
Posts /wp-admin/edit.php3.36 ▲0.0149.66 ▼0.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.35 ▼24.21
Media Library /wp-admin/upload.php3.23 ▲0.0137.89 ▲3.72
Automatically Ban IPs /wp-admin/options-general.php?page=automatically_ban_ips_config3.2033.01

Server storage [IO: ▲0.01MB] [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: 2 new files
Database: 1 new table, 6 new options
New tables
wp_check_ip
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Automatically Ban IPs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.14 ▼1.292.23 ▲0.6244.90 ▲7.05
Dashboard /wp-admin2,210 ▲256.02 ▲1.14101.28 ▼14.0842.64 ▲0.18
Posts /wp-admin/edit.php2,090 ▲11.98 ▼0.0435.09 ▼3.8934.52 ▼1.85
Add New Post /wp-admin/post-new.php1,536 ▼623.12 ▲4.96662.42 ▲49.3565.67 ▲7.90
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.0797.80 ▼0.2746.72 ▲4.23
Automatically Ban IPs /wp-admin/options-general.php?page=automatically_ban_ips_config7872.0324.0225.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/automatically-ban-ips/automatically-ban-ips.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

automatically-ban-ips/automatically-ban-ips.php Passed 13 tests

Analyzing the main PHP file in "Automatically Ban IPs" version 0.2
66 characters long description:
If somebody open site too frequently ban their IPs with .htaccess.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin144 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15990144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin