Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.69MB] [CPU: ▼7.76ms] Passed 4 tests
An overview of server-side resources used by IP2Location Country Blocker
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.19 ▲0.72 | 37.14 ▼4.19 |
Dashboard /wp-admin | 4.04 ▲0.69 | 50.06 ▼11.50 |
Posts /wp-admin/edit.php | 4.09 ▲0.73 | 49.72 ▲2.83 |
Add New Post /wp-admin/post-new.php | 6.57 ▲0.69 | 84.21 ▼18.16 |
Media Library /wp-admin/upload.php | 3.90 ▲0.67 | 37.73 ▲4.29 |
Settings /wp-admin/admin.php?page=ip2location-country-blocker-settings | 3.87 | 33.65 |
Statistics /wp-admin/admin.php?page=ip2location-country-blocker-statistics | 3.87 | 33.96 |
IP Lookup /wp-admin/admin.php?page=ip2location-country-blocker-ip-lookup | 3.87 | 33.45 |
Backend /wp-admin/admin.php?page=ip2location-country-blocker-backend | 3.87 | 32.60 |
Frontend /wp-admin/admin.php?page=ip2location-country-blocker | 3.87 | 33.63 |
Server storage [IO: ▲0.66MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 65 new files
Database: 3 new tables, 45 new options
New tables |
---|
wp_ip2location_country_blocker_backend_rate_limit_log |
wp_ip2location_country_blocker_frontend_rate_limit_log |
wp_ip2location_country_blocker_log |
New WordPress options |
---|
ip2location_country_blocker_px_lookup_mode |
ip2location_country_blocker_frontend_whitelist_logged_user |
ip2location_country_blocker_detect_forwarder_ip |
ip2location_country_blocker_backend_block_mode |
ip2location_country_blocker_frontend_skip_bots |
ip2location_country_blocker_debug_log_enabled |
db_upgraded |
ip2location_country_blocker_px_database |
ip2location_country_blocker_frontend_redirect_url |
ip2location_country_blocker_backend_skip_bots |
... |
Browser metrics Passed 4 tests
A check of browser resources used by IP2Location Country Blocker
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,869 ▲107 | 14.34 ▼0.37 | 1.72 ▼0.09 | 36.31 ▼7.22 |
Dashboard /wp-admin | 2,275 ▲95 | 5.66 ▲0.02 | 93.18 ▼6.15 | 40.61 ▼2.10 |
Posts /wp-admin/edit.php | 2,177 ▲77 | 2.01 ▲0.07 | 40.42 ▲3.70 | 38.70 ▲3.96 |
Add New Post /wp-admin/post-new.php | 1,567 ▲32 | 23.32 ▼1.81 | 643.76 ▼4.60 | 50.09 ▼14.94 |
Media Library /wp-admin/upload.php | 1,477 ▲77 | 4.28 ▲0.03 | 99.50 ▼4.90 | 40.36 ▼3.42 |
Settings /wp-admin/admin.php?page=ip2location-country-blocker-settings | 1,539 | 2.23 | 35.20 | 37.70 |
Statistics /wp-admin/admin.php?page=ip2location-country-blocker-statistics | 1,546 | 2.36 | 29.29 | 30.85 |
IP Lookup /wp-admin/admin.php?page=ip2location-country-blocker-ip-lookup | 1,536 | 2.23 | 28.21 | 30.91 |
Backend /wp-admin/admin.php?page=ip2location-country-blocker-backend | 1,546 | 2.31 | 26.67 | 33.88 |
Frontend /wp-admin/admin.php?page=ip2location-country-blocker | 1,552 | 2.31 | 26.83 | 32.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Zombie tables were found after uninstall: 2 tables
- wp_ip2location_country_blocker_frontend_rate_limit_log
- wp_ip2location_country_blocker_backend_rate_limit_log
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/tests/bootstrap.php
- > /wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2proxy-php/tests/bootstrap.php
- 11× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/tests/WebServiceTest.php:10
- > PHP Warning
require(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2proxy-php/examples/example.php on line 3
- > PHP Warning
require(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/examples/example.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2proxy-php/tests/WebServiceTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2proxy-php/tests/DatabaseTest.php:9
- > PHP Fatal error
require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/examples/example.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/tests/IpToolsTest.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2location-php/tests/CountryTest.php:9
- > PHP Fatal error
require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ip2location-country-blocker/vendor/ip2location/ip2proxy-php/examples/example.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% 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 reduce the number of tags, currently 11 tag instead of maximum 10
- Screenshots: Screenshot #6 (**Statistic Page** - View blocked traffics and countries.) image required
ip2location-country-blocker/ip2location-country-blocker.php 92% from 13 tests
The main PHP script in "IP2Location Country Blocker" version 2.33.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Text Domain: The text domain name should consist of only dashes and lowercase characters
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
Good job! No executable or dangerous file extensions detected6,948 lines of code in 47 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 28 | 1,493 | 2,037 | 6,097 |
JavaScript | 8 | 86 | 12 | 392 |
JSON | 3 | 0 | 0 | 190 |
Markdown | 2 | 77 | 0 | 189 |
CSS | 4 | 15 | 8 | 66 |
XML | 2 | 0 | 0 | 14 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 58.53 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 532.00 |
Average method complexity | 5.51 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 98.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 17 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 219 | |
▷ Static methods | 26 | 11.87% |
▷ Public methods | 117 | 53.42% |
▷ Protected methods | 2 | 0.91% |
▷ Private methods | 100 | 45.66% |
Functions | 4 | |
▷ Named functions | 1 | 25.00% |
▷ Anonymous functions | 3 | 75.00% |
Constants | 104 | |
▷ Global constants | 3 | 2.88% |
▷ Class constants | 101 | 97.12% |
▷ Public constants | 77 | 76.24% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/step-1.png | 4.04KB | 1.52KB | ▼ 62.47% |
assets/css/chosen-sprite@2x.png | 0.72KB | 0.83KB | 0.00% |
assets/img/step-end.png | 31.47KB | 10.52KB | ▼ 66.57% |
assets/img/logo.png | 3.47KB | 1.73KB | ▼ 50.07% |
assets/img/step-1-selected.png | 3.01KB | 1.35KB | ▼ 55.06% |