Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼7.23ms] Passed 4 tests
An overview of server-side resources used by If-So Geolocation
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 37.03 ▼2.63 |
Dashboard /wp-admin | 3.31 ▼0.03 | 46.02 ▼15.56 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 42.17 ▼4.44 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 86.95 ▼6.28 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 35.21 ▼0.38 |
Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 264 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for If-So Geolocation
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,797 ▲51 | 14.25 ▼0.00 | 1.69 ▼0.16 | 39.49 ▲0.30 |
Dashboard /wp-admin | 2,200 ▲23 | 5.54 ▼0.13 | 87.62 ▼2.94 | 36.22 ▼4.37 |
Posts /wp-admin/edit.php | 2,112 ▲12 | 1.99 ▼0.04 | 38.13 ▲0.30 | 33.46 ▼4.99 |
Add New Post /wp-admin/post-new.php | 1,545 ▲17 | 18.25 ▼4.82 | 601.67 ▼24.65 | 66.33 ▼5.79 |
Media Library /wp-admin/upload.php | 1,402 ▼1 | 4.20 ▲0.01 | 96.41 ▼0.75 | 45.28 ▼0.12 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/if-so-geolocation/admin/markup/location-override/generator-results.php
- > /wp-content/plugins/if-so-geolocation/admin/markup/location-override/radio-icon.php
- > /wp-content/plugins/if-so-geolocation/admin/markup/location-override/select-icon.php
- 9× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/if-so-geolocation/admin/markup/location-override/generator-form.php:1
- > PHP Warning
include_once(): Failed opening 'IFSO_PLUGIN_BASE_DIRextensions/extension-base/ifso-extension-include.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 4
- > PHP Warning
Use of undefined constant IFSO_PLUGIN_BASE_DIR - assumed 'IFSO_PLUGIN_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 4
- > PHP Warning
Use of undefined constant IFSO_PLUGIN_BASE_DIR - assumed 'IFSO_PLUGIN_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/if-so-geolocation/admin/markup/geo_analysis_tool_page_display.php:2
- > PHP Warning
include_once(IFSO_PLUGIN_BASE_DIRextensions/extension-base/ifso-extension-include.php): failed to open stream: No such file or directory in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/if-so-geolocation/admin/markup/location-override/location_override_generator_page_display.php:2
- > PHP Warning
require_once(IFSO_PLUGIN_BASE_DIRservices/geolocation-service/geolocation-service.class.php): failed to open stream: No such file or directory in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 7
- > PHP Fatal error
require_once(): Failed opening required 'IFSO_PLUGIN_BASE_DIRservices/geolocation-service/geolocation-service.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/if-so-geolocation/ifso-geolocation.class.php on line 7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: geoip, location-based content, geolocation, geotargeting, geolocation redirect
if-so-geolocation/ifso-geolocation.php 92% from 13 tests
The principal PHP file in "If-So Geolocation" v. 1.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("if-so-geolocation.php" instead of "ifso-geolocation.php")
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
Everything looks great! No dangerous files found in this plugin1,616 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 89 | 13 | 821 |
CSS | 1 | 84 | 16 | 467 |
JavaScript | 4 | 47 | 4 | 328 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 26.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 51.00 |
Average method complexity | 3.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 29 | |
▷ Static methods | 1 | 3.45% |
▷ Public methods | 22 | 75.86% |
▷ Protected methods | 2 | 6.90% |
▷ Private methods | 5 | 17.24% |
Functions | 8 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 8 | 100.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
242 compressed PNG files occupy 0.41MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/flags/TG-flag.png | 0.44KB | 0.44KB | ▼ 1.11% |
assets/img/flags/MU-flag.png | 0.13KB | 0.13KB | 0.00% |
assets/img/flags/TK-flag.png | 4.26KB | 2.17KB | ▼ 49.04% |
assets/img/flags/NR-flag.png | 0.44KB | 0.47KB | 0.00% |
assets/img/flags/NI-flag.png | 0.88KB | 0.84KB | ▼ 4.89% |