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.71MB] [CPU: ▼1.56ms] Passed 4 tests
An overview of server-side resources used by IP2Location Tags
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.20 ▲0.73 | 45.44 ▲2.08 |
Dashboard /wp-admin | 4.02 ▲0.67 | 51.55 ▼7.95 |
Posts /wp-admin/edit.php | 4.14 ▲0.77 | 51.53 ▲3.44 |
Add New Post /wp-admin/post-new.php | 6.62 ▲0.73 | 92.43 ▼3.79 |
Media Library /wp-admin/upload.php | 3.94 ▲0.71 | 41.56 ▲7.55 |
IP2Location Tags /wp-admin/options-general.php?page=ip2location-tags | 3.93 | 38.09 |
Server storage [IO: ▲2.84MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 792 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
ip2location_tags_lookup_mode |
ip2location_tags_database |
ip2location_tags_io_api_key |
ip2location_tags_api_key |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for IP2Location Tags
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,799 ▲37 | 14.31 ▲0.07 | 1.61 ▲0.01 | 35.82 ▼7.73 |
Dashboard /wp-admin | 2,204 ▲27 | 5.60 ▼0.04 | 91.07 ▼8.50 | 39.78 ▼2.34 |
Posts /wp-admin/edit.php | 2,109 ▲9 | 2.01 ▲0.07 | 35.02 ▼5.29 | 32.02 ▼5.23 |
Add New Post /wp-admin/post-new.php | 1,534 ▲8 | 23.32 ▼0.15 | 676.49 ▼3.28 | 59.45 ▲4.32 |
Media Library /wp-admin/upload.php | 1,412 ▲9 | 4.20 ▼0.04 | 94.83 ▼4.43 | 41.59 ▼0.41 |
IP2Location Tags /wp-admin/options-general.php?page=ip2location-tags | 2,703 | 2.23 | 26.97 | 45.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 7 options
- ip2location_tags_io_api_key
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/ip2location-tags/vendor/ip2location/ip2location-php/tests/bootstrap.php
- 7× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-tags/vendor/ip2location/ip2location-php/tests/WebServiceTest.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ip2location-tags/ip2location-tags.php:11
- > PHP Fatal error
require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ip2location-tags/vendor/ip2location/ip2location-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-tags/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-tags/vendor/ip2location/ip2location-php/tests/IpToolsTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-tags/vendor/ip2location/ip2location-php/tests/CountryTest.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ip2location-tags/vendor/ip2location/ip2location-php/tests/DatabaseTest.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% 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
These attributes need your attention:
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
ip2location-tags/ip2location-tags.php Passed 13 tests
The principal PHP file in "IP2Location Tags" v. 2.13.0 is loaded by WordPress automatically on each request
77 characters long description:
Enable you to use IP2Location tags to customize your post content by country.
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 detected3,842 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 949 | 1,298 | 3,498 |
JavaScript | 3 | 32 | 0 | 131 |
JSON | 2 | 0 | 0 | 101 |
Markdown | 1 | 34 | 0 | 87 |
CSS | 1 | 2 | 0 | 18 |
XML | 1 | 0 | 0 | 7 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 37.69 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 187.00 |
Average method complexity | 4.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 73.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 151 | |
▷ Static methods | 26 | 17.22% |
▷ Public methods | 106 | 70.20% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 45 | 29.80% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 63 | |
▷ Global constants | 3 | 4.76% |
▷ Class constants | 60 | 95.24% |
▷ Public constants | 60 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
755 PNG files occupy 2.55MB with 1.96MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/step-1-selected.png | 3.01KB | 1.35KB | ▼ 55.06% |
assets/img/flags/16/bw_16.png | 2.80KB | 0.19KB | ▼ 93.23% |
assets/img/flags/64/cm_64.png | 3.32KB | 0.57KB | ▼ 82.74% |
assets/img/flags/16/cc_16.png | 3.02KB | 0.47KB | ▼ 84.40% |
assets/img/flags/64/na_64.png | 5.73KB | 1.81KB | ▼ 68.38% |