84% easy-ip-blocker

Code Review | Easy IP Blocker

WordPress plugin Easy IP Blocker scored84%from 54 tests.

About plugin

  • Plugin page: easy-ip-blocker
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2020
  • Latest release: Oct 24, 2022
  • Number of updates: 4
  • Update frequency: every 191.5 days
  • Top authors: carl-alberto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼13.18ms] Passed 4 tests

An overview of server-side resources used by Easy IP Blocker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1334.71 ▼5.95
Dashboard /wp-admin3.43 ▲0.1345.85 ▼1.30
Posts /wp-admin/edit.php3.55 ▲0.1946.98 ▲1.32
Add New Post /wp-admin/post-new.php3.28 ▼2.6035.03 ▼45.79
Media Library /wp-admin/upload.php3.36 ▲0.1335.47 ▲0.32
Easy IP Block Settings /wp-admin/options-general.php?page=easy_ip_blocker_settings3.3635.01

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
easy_ip_blocker_version
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy IP Blocker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.58 ▲0.141.56 ▼0.1336.14 ▼6.39
Dashboard /wp-admin2,202 ▲285.51 ▼0.1284.62 ▼21.7438.51 ▼8.11
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0341.90 ▲4.3835.70 ▲0.38
Add New Post /wp-admin/post-new.php1,529 ▲123.09 ▼0.04674.14 ▼24.0656.26 ▼6.95
Media Library /wp-admin/upload.php1,398 ▼24.23 ▼0.1294.11 ▼6.0840.42 ▼4.64
Easy IP Block Settings /wp-admin/options-general.php?page=easy_ip_blocker_settings9923.1048.7625.99

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=easy_ip_blocker_settings
    • > Network (severe)
    wp-content/plugins/easy-ip-blocker/assets/js/settings.min.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: plugin, wordpress

easy-ip-blocker/easy-ip-blocker.php 92% from 13 tests

The entry point to "Easy IP Blocker" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected614 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6161377614

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.44
Average class complexity31.00
▷ Minimum class complexity10.00
▷ Maximum class complexity54.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin