Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.44MB] [CPU: ▲1.26ms] Passed 4 tests
This is a short check of server-side resources used by WT GeoTargeting
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.69 ▲0.23 | 39.12 ▲2.05 |
Dashboard /wp-admin | 3.84 ▲0.54 | 52.83 ▲8.09 |
Posts /wp-admin/edit.php | 3.89 ▲0.54 | 50.54 ▲4.19 |
Add New Post /wp-admin/post-new.php | 6.38 ▲0.50 | 86.05 ▼8.87 |
Media Library /wp-admin/upload.php | 3.70 ▲0.48 | 40.89 ▲7.67 |
Справка /wp-admin/admin.php?page=wt_geotargeting | 3.69 | 35.66 |
Настройки /wp-admin/admin.php?page=wt_geotargeting/admin/setting.php | 3.67 | 37.45 |
Server storage [IO: ▲0.66MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 93 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
WT GeoTargeting: 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,829 ▲83 | 13.30 ▼1.10 | 1.71 ▲0.16 | 39.40 ▼3.86 |
Dashboard /wp-admin | 2,232 ▲44 | 5.88 ▼0.13 | 97.44 ▼7.07 | 39.64 ▲0.74 |
Posts /wp-admin/edit.php | 2,118 ▲29 | 2.02 ▼0.01 | 36.43 ▼2.56 | 35.66 ▲1.91 |
Add New Post /wp-admin/post-new.php | 1,553 ▲29 | 23.06 ▼0.25 | 604.81 ▼18.32 | 50.21 ▲4.47 |
Media Library /wp-admin/upload.php | 1,417 ▲26 | 4.30 ▲0.13 | 96.39 ▼3.88 | 43.70 ▼3.51 |
Справка /wp-admin/admin.php?page=wt_geotargeting | 986 | 2.19 | 23.89 | 27.72 |
Настройки /wp-admin/admin.php?page=wt_geotargeting/admin/setting.php | 7,214 | 1.81 | 30.73 | 42.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The plugin did not uninstall gracefully
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method WtGeoTargeting::uninstall() should not be called statically
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 39× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Record/AbstractPlaceRecord.php:5
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Model/ConnectionType.php:16
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Record/Traits.php:89
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\HttpException' not found in wp-content/plugins/wt-geotargeting/vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php:8
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/wt-geotargeting/vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wt-geotargeting/includes/WtKit.php:35
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\City' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Model/Insights.php:54
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Exception/AuthenticationException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Model/Domain.php:16
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/wt-geotargeting/vendor/geoip2/geoip2/src/Record/City.php:26
- > 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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: geotargeting, dadata, maxmind, ip-api, geo...
wt-geotargeting/wt_geotargeting.php 92% from 13 tests
The main PHP file in "WT GeoTargeting" ver. 1.9 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wt-geotargeting.php" instead of "wt_geotargeting.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,917 lines of code in 82 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 66 | 786 | 1,760 | 3,332 |
Markdown | 7 | 312 | 0 | 700 |
C | 1 | 73 | 15 | 477 |
JSON | 5 | 0 | 0 | 360 |
JavaScript | 1 | 1 | 0 | 26 |
m4 | 1 | 5 | 0 | 14 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 8.93 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 95.00 |
Average method complexity | 3.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 39.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 57 | |
▷ Abstract classes | 3 | 5.26% |
▷ Concrete classes | 54 | 94.74% |
▷ Final classes | 0 | 0.00% |
Methods | 200 | |
▷ Static methods | 19 | 9.50% |
▷ Public methods | 151 | 75.50% |
▷ Protected methods | 2 | 1.00% |
▷ Private methods | 47 | 23.50% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 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
There are no PNG files in this plugin