Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.28MB] [CPU: ▼7.59ms] Passed 4 tests
A check of server-side resources used by Geolocator
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.78 ▲0.31 | 43.43 ▲6.26 |
Dashboard /wp-admin | 3.63 ▲0.28 | 49.84 ▼13.50 |
Posts /wp-admin/edit.php | 3.68 ▲0.32 | 44.04 ▼4.23 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 81.65 ▼11.56 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 37.61 ▼1.06 |
Geolocator /wp-admin/options-general.php?page=geolocator_options | 3.45 | 29.09 |
Server storage [IO: ▲3.09MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 97 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_theysaidso_widget |
geolocator_options |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_geolocator_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Geolocator
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.73 ▲0.76 | 1.72 ▲0.12 | 46.07 ▲5.06 |
Dashboard /wp-admin | 2,199 ▲21 | 5.63 ▼0.11 | 85.15 ▼26.14 | 35.85 ▼3.24 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.03 ▲0.01 | 34.89 ▼1.96 | 35.36 ▲2.69 |
Add New Post /wp-admin/post-new.php | 6,267 ▲4,741 | 21.05 ▼2.08 | 883.02 ▲262.86 | 94.36 ▲21.73 |
Media Library /wp-admin/upload.php | 1,404 ▲10 | 4.19 ▲0.00 | 94.83 ▼10.08 | 40.39 ▼5.69 |
Geolocator /wp-admin/options-general.php?page=geolocator_options | 797 | 2.00 | 23.62 | 24.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_geolocator_widget
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 39× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\HttpException' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Exception/InvalidRequestException.php:9
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Exception/AuthenticationException.php:8
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geolocator/vendor/maxmind/web-service-common/src/Exception/PermissionRequiredException.php:8
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Record/AbstractPlaceRecord.php:5
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geolocator/vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php:5
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Exception/HttpException.php:9
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\InvalidRequestException' not found in wp-content/plugins/geolocator/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/geolocator/vendor/geoip2/geoip2/src/Record/Location.php:43
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Record/Continent.php:25
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/geolocator/vendor/geoip2/geoip2/src/Record/MaxMind.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
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
6 plugin tags: user country, geolocator, ip based location, hide for country, show for country...
geolocator/geolocator.php 92% from 13 tests
The main file in "Geolocator" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)
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
There were no executable files found in this plugin4,220 lines of code in 83 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 66 | 711 | 1,807 | 2,604 |
Markdown | 8 | 342 | 0 | 743 |
C | 1 | 73 | 15 | 477 |
JSON | 6 | 0 | 0 | 374 |
m4 | 1 | 5 | 0 | 14 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 5.92 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 2.68 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 55 | |
▷ Abstract classes | 3 | 5.45% |
▷ Concrete classes | 52 | 94.55% |
▷ Final classes | 0 | 0.00% |
Methods | 168 | |
▷ Static methods | 9 | 5.36% |
▷ Public methods | 120 | 71.43% |
▷ Protected methods | 1 | 0.60% |
▷ Private methods | 47 | 27.98% |
Functions | 19 | |
▷ Named functions | 14 | 73.68% |
▷ Anonymous functions | 5 | 26.32% |
Constants | 3 | |
▷ Global constants | 1 | 33.33% |
▷ Class constants | 2 | 66.67% |
▷ 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
PNG images were not found in this plugin