Benchmarks
Plugin footprint 65% 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.20MB] [CPU: ▼139.79ms] Passed 4 tests
An overview of server-side resources used by <.htaccess> IP block
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.00 ▲0.28 | 33.22 ▲11.45 |
Dashboard /wp-admin | 3.29 ▲0.24 | 55.54 ▲9.15 |
Posts /wp-admin/edit.php | 3.34 ▲0.23 | 52.24 ▲2.08 |
Add New Post /wp-admin/post-new.php | 5.59 ▲0.16 | 91.89 ▼574.31 |
Media Library /wp-admin/upload.php | 3.17 ▲0.17 | 39.09 ▲3.92 |
Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: 1 new table, 1 new option
New tables |
---|
wp_htaccess_map |
New WordPress options |
---|
HTACCESS_IP_BLOCK_FILE_MAP_NAME |
Browser metrics Passed 4 tests
This is an overview of browser requirements for <.htaccess> IP block
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,723 ▲127 | 15.92 ▲0.03 | 10.81 ▲2.47 | 45.50 ▼8.10 |
Dashboard /wp-admin | 2,993 ▲60 | 5.90 ▼0.05 | 143.38 ▼0.57 | 122.73 ▲13.34 |
Posts /wp-admin/edit.php | 2,759 ▲20 | 2.69 ▲0.00 | 67.36 ▼2.00 | 86.13 ▲0.76 |
Add New Post /wp-admin/post-new.php | 1,628 ▼55 | 21.48 ▲3.11 | 284.27 ▼101.43 | 109.98 ▼3.63 |
Media Library /wp-admin/upload.php | 1,827 ▲20 | 5.01 ▼0.00 | 152.73 ▼2.68 | 125.55 ▼1.36 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 tables were found after uninstall: 1 table
- wp_htaccess_map
- The uninstall procedure has failed, leaving 1 option in the database
- HTACCESS_IP_BLOCK_FILE_MAP_NAME
Smoke tests 75% 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 50% from 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
Almost there! Just fix the following items
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/htaccess-ip-block/inc/jquery.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/htaccess-ip-block/inc/ajax.php:8
- > PHP Warning
require_once(HTACCESS_IP_BLOCK_PATHinc/WP_List_Table_Htaccess_Ip_Block.php): failed to open stream: No such file or directory in wp-content/plugins/htaccess-ip-block/inc/IpListTable.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/htaccess-ip-block/index.php:11
- > PHP Warning
Use of undefined constant HTACCESS_IP_BLOCK_PATH - assumed 'HTACCESS_IP_BLOCK_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/htaccess-ip-block/inc/IpListTable.php on line 10
- > PHP Fatal error
require_once(): Failed opening required 'HTACCESS_IP_BLOCK_PATHinc/WP_List_Table_Htaccess_Ip_Block.php' (include_path='.:/usr/share/php') in wp-content/plugins/htaccess-ip-block/inc/IpListTable.php on line 10
- > PHP Fatal error
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 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
- Screenshots: Screenshot #1 (Example Control Panel) image not found
htaccess-ip-block/index.php 92% from 13 tests
The main PHP script in "<.htaccess> IP block" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("htaccess-ip-block.php" instead of "index.php")
Code Analysis Passed 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 plugin1,095 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 294 | 562 | 1,095 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 48.67 |
▷ Minimum class complexity | 14.00 |
▷ Maximum class complexity | 117.00 |
Average method complexity | 2.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 70 | |
▷ Static methods | 8 | 11.43% |
▷ Public methods | 47 | 67.14% |
▷ Protected methods | 21 | 30.00% |
▷ Private methods | 2 | 2.86% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 7 | |
▷ Global constants | 1 | 14.29% |
▷ Class constants | 6 | 85.71% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 133.74KB | 47.16KB | ▼ 64.74% |