Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.69MB] [CPU: ▼4.66ms] Passed 4 tests
Server-side resources used by country-redirect
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 36.68 ▼5.43 |
Dashboard /wp-admin | 4.19 ▲0.88 | 47.83 ▼5.50 |
Posts /wp-admin/edit.php | 4.30 ▲0.94 | 49.86 ▼0.09 |
Add New Post /wp-admin/post-new.php | 6.77 ▲0.88 | 94.95 ▼7.63 |
Media Library /wp-admin/upload.php | 4.11 ▲0.88 | 36.56 ▲4.22 |
Country Redirect /wp-admin/options-general.php?page=country-redirect-options | 4.08 | 33.18 |
Server storage [IO: ▲6.90MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for country-redirect
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲88 | 13.24 ▼1.06 | 1.65 ▼0.01 | 39.84 ▼6.74 |
Dashboard /wp-admin | 2,213 ▲25 | 6.06 ▲0.25 | 97.64 ▼2.88 | 42.05 ▼2.49 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.05 ▼0.12 | 40.30 ▼1.68 | 35.39 ▼0.18 |
Add New Post /wp-admin/post-new.php | 1,536 ▲3 | 23.05 ▼0.14 | 611.05 ▲4.36 | 54.33 ▲2.18 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.20 ▼0.11 | 97.63 ▼3.90 | 41.53 ▼2.39 |
Country Redirect /wp-admin/options-general.php?page=country-redirect-options | 835 | 2.02 | 22.16 | 28.36 |
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
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Please take a closer look at the following
- 35× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\City' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Model/Enterprise.php:45
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Record/Traits.php:91
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/country-redirect/vendor/maxmind/web-service-common/src/Exception/InsufficientFundsException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Record/Postal.php:20
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\City' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Model/Insights.php:45
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Record/MaxMind.php:13
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\Country' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Record/RepresentedCountry.php:29
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Exception/AuthenticationException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Model/ConnectionType.php:14
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/country-redirect/vendor/geoip2/geoip2/src/Record/AbstractPlaceRecord.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: redirect by ip, ip, geo, redirect, redirect by country...
country-redirect/country-redirect.php 92% from 13 tests
The main file in "country-redirect" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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
There were no executable files found in this plugin5,185 lines of code in 84 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 66 | 619 | 1,687 | 3,234 |
Markdown | 7 | 360 | 0 | 830 |
C | 1 | 97 | 18 | 582 |
JSON | 6 | 0 | 0 | 376 |
PO File | 1 | 23 | 43 | 83 |
Bourne Shell | 1 | 20 | 0 | 40 |
m4 | 1 | 8 | 0 | 32 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 7.15 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 78.00 |
Average method complexity | 3.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 31.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 50 | |
▷ Abstract classes | 3 | 6.00% |
▷ Concrete classes | 47 | 94.00% |
▷ Final classes | 0 | 0.00% |
Methods | 152 | |
▷ Static methods | 11 | 7.24% |
▷ Public methods | 101 | 66.45% |
▷ Protected methods | 6 | 3.95% |
▷ Private methods | 45 | 29.61% |
Functions | 31 | |
▷ Named functions | 22 | 70.97% |
▷ Anonymous functions | 9 | 29.03% |
Constants | 22 | |
▷ Global constants | 4 | 18.18% |
▷ Class constants | 18 | 81.82% |
▷ Public constants | 18 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin