Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/geotargeting/includes/class-geot-maxmind.php+89
unlink(wp-content/uploads/geot_plugin/GeoLite2-Country.mmdb): No such file or directory
Server metrics [RAM: ▲0.44MB] [CPU: ▼0.43ms] Passed 4 tests
This is a short check of server-side resources used by GeoTargeting Lite - WordPress Geolocation
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.94 ▲0.48 | 48.24 ▼0.09 |
Dashboard /wp-admin | 3.77 ▲0.47 | 52.44 ▲0.58 |
Posts /wp-admin/edit.php | 3.82 ▲0.46 | 50.09 ▲1.13 |
Add New Post /wp-admin/post-new.php | 6.31 ▲0.42 | 91.14 ▼3.33 |
Media Library /wp-admin/upload.php | 3.63 ▲0.40 | 38.14 ▲5.19 |
Settings /wp-admin/admin.php?page=geot-settings | 3.60 | 35.65 |
Ip test /wp-admin/admin.php?page=geot-ip-test | 3.60 | 37.44 |
Server storage [IO: ▲3.29MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 198 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_geot_countries |
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
geot_version |
Browser metrics Passed 4 tests
A check of browser resources used by GeoTargeting Lite - WordPress Geolocation
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,945 ▲210 | 13.63 ▼0.75 | 7.08 ▲5.00 | 44.41 ▲0.24 |
Dashboard /wp-admin | 2,241 ▲53 | 4.87 ▼0.03 | 116.05 ▼1.03 | 43.20 ▼2.90 |
Posts /wp-admin/edit.php | 2,127 ▲41 | 2.06 ▲0.02 | 37.27 ▲1.01 | 33.09 ▲0.89 |
Add New Post /wp-admin/post-new.php | 1,544 ▲11 | 23.40 ▲0.30 | 582.92 ▼93.23 | 50.16 ▼10.19 |
Media Library /wp-admin/upload.php | 1,426 ▲38 | 4.27 ▲0.08 | 98.76 ▲0.71 | 44.13 ▼0.74 |
Settings /wp-admin/admin.php?page=geot-settings | 835 | 1.73 | 24.88 | 28.86 |
Ip test /wp-admin/admin.php?page=geot-ip-test | 824 | 1.71 | 25.26 | 25.16 |
Uninstaller [IO: ▲5.81MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% 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)
Good news, no errors were detected
SRP 0% 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 fix the following items
- 4× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/geotargeting/vendor/geoip2/geoip2/tests/bootstrap.php
- > /wp-content/plugins/geotargeting/public/partials/plugin-name-public-display.php
- > /wp-content/plugins/geotargeting/vendor/maxmind/web-service-common/tests/bootstrap.php
- > /wp-content/plugins/geotargeting/vendor/maxmind-db/reader/tests/bootstrap.php
- 60× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/geotargeting/vendor/geoip2/geoip2/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/examples/benchmark.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/src/Record/Traits.php:105
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geotargeting/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/geotargeting/vendor/geoip2/geoip2/src/Record/City.php:23
- > PHP Warning
require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/geotargeting/vendor/maxmind-db/reader/examples/benchmark.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/src/Model/Asn.php:21
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/tests/GeoIp2/Test/WebService/ClientTest.php:8
- > PHP Warning
require(wp-content/plugins/geotargeting/vendor/geoip2/geoip2/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/examples/benchmark.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geotargeting/vendor/maxmind/web-service-common/src/Exception/PermissionRequiredException.php:8
- > PHP Warning
require_once(geoip2.phar): failed to open stream: No such file or directory in wp-content/plugins/geotargeting/vendor/geoip2/geoip2/dev-bin/phar-test.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
geotargeting/geotargeting.php 92% from 13 tests
Analyzing the main PHP file in "GeoTargeting Lite - WordPress Geolocation" version 1.3.6.1
Please make the necessary changes and fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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
Success! There were no dangerous files found in this plugin9,972 lines of code in 160 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 112 | 1,280 | 2,914 | 6,843 |
Markdown | 9 | 393 | 0 | 933 |
C | 1 | 97 | 18 | 589 |
JSON | 11 | 0 | 0 | 517 |
CSS | 3 | 4 | 4 | 343 |
JavaScript | 7 | 97 | 62 | 341 |
Bourne Shell | 6 | 70 | 6 | 193 |
YAML | 4 | 22 | 0 | 93 |
XML | 5 | 14 | 0 | 80 |
m4 | 1 | 8 | 0 | 32 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 5.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 2.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 21 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 83 | |
▷ Abstract classes | 4 | 4.82% |
▷ Concrete classes | 79 | 95.18% |
▷ Final classes | 0 | 0.00% |
Methods | 337 | |
▷ Static methods | 25 | 7.42% |
▷ Public methods | 261 | 77.45% |
▷ Protected methods | 5 | 1.48% |
▷ Private methods | 71 | 21.07% |
Functions | 13 | |
▷ Named functions | 9 | 69.23% |
▷ Anonymous functions | 4 | 30.77% |
Constants | 24 | |
▷ Global constants | 6 | 25.00% |
▷ Class constants | 18 | 75.00% |
▷ 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
6 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/valid-key.png | 1.43KB | 0.67KB | ▼ 53.21% |
admin/img/invalid-key.png | 0.78KB | 0.74KB | ▼ 4.41% |
admin/js/world.png | 1.00KB | 0.94KB | ▼ 6.51% |
admin/img/chosen-sprite.png | 0.53KB | 0.88KB | 0.00% |
admin/img/chosen-sprite@2x.png | 0.72KB | 0.83KB | 0.00% |