Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.28MB] [CPU: ▲1.16ms] Passed 4 tests
This is a short check of server-side resources used by Geocode Switch
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.75 ▲0.29 | 43.80 ▲1.60 |
Dashboard /wp-admin | 3.63 ▲0.32 | 53.85 ▲2.08 |
Posts /wp-admin/edit.php | 3.68 ▲0.32 | 54.27 ▲4.26 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 86.37 ▼3.29 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 40.89 ▲4.81 |
GeoSwitch /wp-admin/options-general.php?page=geoswitch/class.geoswitch_admin.php | 3.46 | 32.51 |
Server storage [IO: ▲54.53MB] [DB: ▲0.00MB] 67% from 3 tests
How much does this plugin use your filesystem and database?
Please fix the following
- Total filesystem usage must be limited to 25MB (currently using 54.53MB)
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
geoswitch_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Geocode Switch: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.72 ▲0.52 | 1.72 ▲0.09 | 46.09 ▲3.00 |
Dashboard /wp-admin | 2,196 ▲19 | 5.62 ▲0.01 | 98.27 ▲4.56 | 45.02 ▲2.17 |
Posts /wp-admin/edit.php | 2,101 ▼2 | 1.97 ▲0.02 | 33.35 ▼5.72 | 34.81 ▼3.88 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.11 ▼0.02 | 638.12 ▼42.74 | 55.71 ▼2.06 |
Media Library /wp-admin/upload.php | 1,398 ▼5 | 4.18 ▲0.04 | 94.12 ▼8.26 | 40.47 ▼2.30 |
GeoSwitch /wp-admin/options-general.php?page=geoswitch/class.geoswitch_admin.php | 889 | 2.19 | 23.91 | 26.79 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/geoswitch/class.geoswitch.php
- > /wp-content/plugins/geoswitch/geoswitch.php
- > /wp-content/plugins/geoswitch/class.geoswitch_admin.php
- 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Record/Postal.php:20
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Exception/HttpException.php:8
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geoswitch/vendor/maxmind/web-service-common/src/Exception/InsufficientFundsException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Record/Country.php:29
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Record/Location.php:36
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Record/MaxMind.php:13
- > PHP Fatal error
Uncaught Error: Interface 'MaxMind\\WebService\\Http\\Request' not found in wp-content/plugins/geoswitch/vendor/maxmind/web-service-common/src/WebService/Http/CurlRequest.php:12
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\WebServiceException' not found in wp-content/plugins/geoswitch/vendor/maxmind/web-service-common/src/Exception/HttpException.php:8
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geoswitch/vendor/maxmind/web-service-common/src/Exception/AuthenticationException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/geoswitch/vendor/geoip2/geoip2/src/Model/AnonymousIp.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
geoswitch/geoswitch.php Passed 13 tests
"Geocode Switch" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
117 characters long description:
GeoSwitch is a plugin that allows you to change the content of your site based on the location of your client’s IP.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,352 lines of code in 81 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 64 | 551 | 1,515 | 2,656 |
Markdown | 7 | 346 | 0 | 784 |
C | 1 | 73 | 15 | 476 |
JSON | 6 | 0 | 0 | 374 |
Bourne Shell | 1 | 20 | 0 | 40 |
m4 | 1 | 5 | 0 | 14 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 6.45 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 2.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 22.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 51 | |
▷ Abstract classes | 3 | 5.88% |
▷ Concrete classes | 48 | 94.12% |
▷ Final classes | 0 | 0.00% |
Methods | 179 | |
▷ Static methods | 47 | 26.26% |
▷ Public methods | 127 | 70.95% |
▷ Protected methods | 1 | 0.56% |
▷ Private methods | 51 | 28.49% |
Functions | 6 | |
▷ Named functions | 2 | 33.33% |
▷ Anonymous functions | 4 | 66.67% |
Constants | 5 | |
▷ Global constants | 3 | 60.00% |
▷ Class constants | 2 | 40.00% |
▷ Public constants | 2 | 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
No PNG images were found in this plugin