Benchmarks
Plugin footprint 23% 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
You still need to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/google-maps-travel-route/php/gmtr-widget.php+9
Methods with the same name as their class will not be constructors in a future version of PHP; WP_GMTR_Widget has a deprecated constructor
Server metrics [RAM: ▼1.86MB] [CPU: ▼57.73ms] Passed 4 tests
A check of server-side resources used by Google Maps Travel Route
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.13 ▼1.33 | 4.60 ▼38.11 |
Dashboard /wp-admin | 2.15 ▼1.15 | 6.08 ▼47.22 |
Posts /wp-admin/edit.php | 2.15 ▼1.20 | 6.47 ▼49.87 |
Add New Post /wp-admin/post-new.php | 2.15 ▼3.73 | 6.10 ▼95.72 |
Media Library /wp-admin/upload.php | 2.15 ▼1.08 | 8.11 ▼25.78 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_gmtr_data |
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_gmtr_widget |
gmtr_default_marker_icon |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Google Maps Travel Route
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲14 | 14.24 ▼0.14 | 1.67 ▼0.60 | 42.73 ▼2.16 |
Dashboard /wp-admin | 2,209 ▲29 | 5.54 ▼0.13 | 88.73 ▼9.88 | 76.74 ▲32.64 |
Posts /wp-admin/edit.php | 2,117 ▲17 | 1.99 ▼0.02 | 36.27 ▼5.55 | 34.44 ▼2.60 |
Add New Post /wp-admin/post-new.php | 1,689 ▲160 | 21.89 ▼0.98 | 719.90 ▲45.71 | 44.97 ▼5.95 |
Media Library /wp-admin/upload.php | 1,414 ▲14 | 4.12 ▼0.05 | 111.97 ▲5.27 | 67.00 ▲19.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/google-maps-travel-route/php/gmtr-widget.php+9
Methods with the same name as their class will not be constructors in a future version of PHP; WP_GMTR_Widget has a deprecated constructor
- Zombie tables detected upon uninstall: 1 table
- wp_gmtr_data
- Zombie WordPress options detected upon uninstall: 8 options
- gmtr_default_marker_icon
- theysaidso_admin_options
- widget_gmtr_widget
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
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)
Everything seems fine, however this is by no means an exhaustive test
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
The following issues need your attention
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/google-maps-travel-route/views/dashboard.php
- > /wp-content/plugins/google-maps-travel-route/views/add-location.php
- > /wp-content/plugins/google-maps-travel-route/views/shortcode-generator.php
- 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 8
- > PHP Notice
Undefined variable: current in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 20
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/google-maps-travel-route/php/gmtr-shortcode.php:3
- > PHP Notice
Undefined variable: current in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 26
- > PHP Notice
Undefined variable: current in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 23
- > PHP Notice
Undefined variable: current in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 29
- > PHP Notice
Trying to get property 'base_prefix' of non-object in wp-content/plugins/google-maps-travel-route/views/show-locations.php on line 6
- > PHP Notice
Undefined variable: tabs in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-maps-travel-route/php/gmtr-widget.php:7
- > PHP Notice
Undefined variable: current in wp-content/plugins/google-maps-travel-route/views/dashboard.php on line 32
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== google-maps-travel-route ===
)
google-maps-travel-route/google-maps-travel-route.php Passed 13 tests
"Google Maps Travel Route" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
91 characters long description:
With the Google Maps Travel Route plugin you can easily show a static route on Google Maps.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,453 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 197 | 112 | 1,383 |
CSS | 3 | 11 | 0 | 42 |
JavaScript | 1 | 6 | 0 | 28 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 11.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 3.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/google-marker-gray.png | 3.02KB | 0.31KB | ▼ 89.67% |
images/link.png | 1.67KB | 0.83KB | ▼ 50.12% |
images/icons/default.png | 0.79KB | 0.84KB | 0.00% |