Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.97MB] [CPU: ▼1.64ms] Passed 4 tests
This is a short check of server-side resources used by IP2Location Redirection
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.42 ▲0.96 | 39.59 ▲2.28 |
Dashboard /wp-admin | 4.33 ▲0.98 | 47.45 ▼11.53 |
Posts /wp-admin/edit.php | 4.38 ▲1.02 | 54.96 ▲7.71 |
Add New Post /wp-admin/post-new.php | 6.85 ▲0.96 | 98.12 ▼4.39 |
Media Library /wp-admin/upload.php | 4.19 ▲0.96 | 40.02 ▲7.09 |
Rules /wp-admin/admin.php?page=ip2location-redirection | 4.17 | 34.70 |
IP Lookup /wp-admin/admin.php?page=ip2location-redirection-ip-lookup | 4.15 | 33.71 |
Settings /wp-admin/admin.php?page=ip2location-redirection-settings | 4.16 | 34.01 |
Server storage [IO: ▲2.55MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 20 new options
New WordPress options |
---|
ip2location_redirection_database |
can_compress_scripts |
ip2location_redirection_ip_whitelist |
theysaidso_admin_options |
widget_recent-posts |
ip2location_redirection_first_redirect |
widget_theysaidso_widget |
db_upgraded |
ip2location_redirection_api_key |
ip2location_redirection_noredirect_enabled |
... |
Browser metrics Passed 4 tests
IP2Location Redirection: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,859 ▲112 | 14.33 ▲0.06 | 1.60 ▼0.44 | 37.04 ▼6.23 |
Dashboard /wp-admin | 2,265 ▲87 | 5.62 ▼0.12 | 91.28 ▼18.05 | 39.04 ▼3.24 |
Posts /wp-admin/edit.php | 2,167 ▲64 | 2.03 ▲0.10 | 39.73 ▼0.08 | 38.56 ▼0.18 |
Add New Post /wp-admin/post-new.php | 1,562 ▲36 | 23.38 ▲0.09 | 636.44 ▲37.95 | 67.57 ▲10.90 |
Media Library /wp-admin/upload.php | 1,470 ▲67 | 4.22 ▲0.06 | 96.96 ▼3.23 | 41.43 ▲1.22 |
Rules /wp-admin/admin.php?page=ip2location-redirection | 3,863 | 3.71 | 88.97 | 38.66 |
IP Lookup /wp-admin/admin.php?page=ip2location-redirection-ip-lookup | 867 | 1.69 | 26.58 | 28.12 |
Settings /wp-admin/admin.php?page=ip2location-redirection-settings | 1,083 | 2.21 | 27.16 | 33.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 7 options in the database
- ip2location_redirection_download_ipv4_only
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
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
Good news, no errors were detected
SRP 50% 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
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Exception: IP2Location\\WebService: OK in wp-content/plugins/ip2location-redirection/vendor/ip2location/ip2location-php/IP2Location.php:2203
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ip2location-redirection/ip2location-redirection.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 93% 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
Attributes that need to be fixed:
- Tags: There are too many tags (13 tag instead of maximum 10)
ip2location-redirection/ip2location-redirection.php 92% from 13 tests
The entry point to "IP2Location Redirection" version 1.28.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Text Domain: Please use dashes and lowercase characters for text domains
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please fix the following items
- Do not include executable or dangerous files in your plugin
- .bin - Binary Executable in Windows, macOS, Linux
- ☣ wp-content/plugins/ip2location-redirection/vendor/ip2location/ip2location-php/databases/IP2LOCATION-LITE-DB1.BIN
- .bin - Binary Executable in Windows, macOS, Linux
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 105 | 4 | 4,369 |
PHP | 11 | 738 | 1,176 | 3,513 |
CSS | 2 | 19 | 0 | 107 |
Markdown | 1 | 29 | 0 | 65 |
JSON | 2 | 0 | 0 | 62 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 100.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 372.00 |
Average method complexity | 6.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 113 | |
▷ Static methods | 13 | 11.50% |
▷ Public methods | 55 | 48.67% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 58 | 51.33% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 54 | |
▷ Global constants | 3 | 5.56% |
▷ Class constants | 51 | 94.44% |
▷ Public constants | 51 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
8 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/logo.png | 3.47KB | 1.73KB | ▼ 50.07% |
assets/img/step-2.png | 4.17KB | 1.69KB | ▼ 59.53% |
assets/img/step-3-selected.png | 3.89KB | 1.82KB | ▼ 53.23% |
assets/img/step-1-selected.png | 3.01KB | 1.35KB | ▼ 55.06% |
assets/img/step-end.png | 31.47KB | 10.52KB | ▼ 66.57% |