Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/mhs-travel-map/includes/class-mhs-tm-utilities.php+80
Trying to access array offset on value of type null
Server metrics [RAM: ▼1.86MB] [CPU: ▼57.98ms] Passed 4 tests
A check of server-side resources used by My Hitchhiking Spot Travel Map (MHS Travel Map)
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.07 ▼1.39 | 4.58 ▼39.04 |
Dashboard /wp-admin | 2.17 ▼1.13 | 6.71 ▼44.89 |
Posts /wp-admin/edit.php | 2.17 ▼1.18 | 7.89 ▼42.21 |
Add New Post /wp-admin/post-new.php | 2.17 ▼3.72 | 6.10 ▼105.78 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 5.95 ▼29.20 |
Routes /wp-admin/admin.php?page=mhs_tm-routes | 2.17 | 6.61 |
Maps /wp-admin/admin.php?page=mhs_tm-maps | 2.17 | 6.72 |
Map edit /wp-admin/admin.php?page=mhs_tm-maps-edit | 2.17 | 6.76 |
Settings /wp-admin/admin.php?page=mhs_tm-settings | 2.17 | 5.75 |
Server storage [IO: ▲1.26MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 62 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_mhs_tm_routes |
wp_mhs_tm_maps |
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
MHS_TM_db_version |
Browser metrics Passed 4 tests
Checking browser requirements for My Hitchhiking Spot Travel Map (MHS Travel Map)
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,963 ▲206 | 14.48 ▼0.20 | 10.83 ▲8.64 | 42.13 ▼4.65 |
Dashboard /wp-admin | 2,261 ▲73 | 5.65 ▲0.78 | 111.41 ▲7.88 | 77.95 ▲39.08 |
Posts /wp-admin/edit.php | 2,146 ▲57 | 2.40 ▲0.40 | 44.50 ▲8.99 | 35.57 ▲2.87 |
Add New Post /wp-admin/post-new.php | 1,563 ▲49 | 23.48 ▲5.90 | 675.52 ▲22.18 | 37.78 ▼19.41 |
Media Library /wp-admin/upload.php | 1,440 ▲52 | 5.01 ▲0.80 | 116.61 ▲16.34 | 44.70 ▲3.11 |
Routes /wp-admin/admin.php?page=mhs_tm-routes | 1,166 | 3.70 | 69.10 | 27.99 |
Maps /wp-admin/admin.php?page=mhs_tm-maps | 1,069 | 2.41 | 32.52 | 24.38 |
Map edit /wp-admin/admin.php?page=mhs_tm-maps-edit | 968 | 2.42 | 28.69 | 27.30 |
Settings /wp-admin/admin.php?page=mhs_tm-settings | 1,273 | 3.09 | 53.51 | 26.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/mhs-travel-map/includes/class-mhs-tm-utilities.php+80
Trying to access array offset on value of type null
- The uninstall procedure failed, leaving 2 tables in the database
- wp_mhs_tm_maps
- wp_mhs_tm_routes
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-posts
- MHS_TM_db_version
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 8 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=mhs_tm-settings
- > Notice in wp-content/plugins/mhs-travel-map/includes/class-mhs-tm-utilities.php+80
Trying to access array offset on value of type null
- > GET request to /wp-admin/admin.php?page=mhs_tm-routes
- > Notice in wp-content/plugins/mhs-travel-map/includes/class-mhs-tm-utilities.php+96
Undefined index: api_key_gmap
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
Almost there! Just fix the following items
- 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
require_once(MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php): failed to open stream: No such file or directory in wp-content/plugins/mhs-travel-map/admin/tables/list-table-map-routes.php on line 32
- > PHP Warning
require_once(MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php): failed to open stream: No such file or directory in wp-content/plugins/mhs-travel-map/admin/tables/list-table-routes.php on line 32
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mhs-travel-map/mhs-tm.php:38
- > PHP Fatal error
require_once(): Failed opening required 'MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php' (include_path='.:/usr/share/php') in wp-content/plugins/mhs-travel-map/admin/tables/list-table-maps.php on line 32
- > PHP Warning
Use of undefined constant MHS_TM_ABSPATH - assumed 'MHS_TM_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mhs-travel-map/admin/tables/list-table-maps.php on line 32
- > PHP Warning
Use of undefined constant MHS_TM_ABSPATH - assumed 'MHS_TM_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mhs-travel-map/admin/tables/list-table-routes.php on line 32
- > PHP Fatal error
require_once(): Failed opening required 'MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php' (include_path='.:/usr/share/php') in wp-content/plugins/mhs-travel-map/admin/tables/list-table-map-routes.php on line 32
- > PHP Warning
Use of undefined constant MHS_TM_ABSPATH - assumed 'MHS_TM_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mhs-travel-map/admin/tables/list-table-map-routes.php on line 32
- > PHP Warning
require_once(MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php): failed to open stream: No such file or directory in wp-content/plugins/mhs-travel-map/admin/tables/list-table-maps.php on line 32
- > PHP Fatal error
require_once(): Failed opening required 'MHS_TM_ABSPATH/admin/tables/class-wp-list-table-my.php' (include_path='.:/usr/share/php') in wp-content/plugins/mhs-travel-map/admin/tables/list-table-routes.php on line 32
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=mhs_tm-routes
- > Console-api (warning) in unknown
https://maps.googleapis.com/maps/api/js?key=AIzaSyAcxQgsVr_SEK2rUape65zv7v6Jn0ElZHc&ver=6.3.1 208:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: travel, google maps, hitchhike, hitchhiking, backpacking...
mhs-travel-map/mhs-tm.php 85% from 13 tests
The main file in "My Hitchhiking Spot Travel Map (MHS Travel Map)" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mhs-travel-map.php" instead of "mhs-tm.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 347 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected21,044 lines of code in 44 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 13 | 3,113 | 2,468 | 12,875 |
PHP | 16 | 900 | 1,862 | 4,344 |
CSS | 13 | 178 | 167 | 3,304 |
HTML | 1 | 96 | 16 | 447 |
JSON | 1 | 0 | 0 | 74 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 130)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 40.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 155.00 |
Average method complexity | 5.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 130.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 145 | |
▷ Static methods | 1 | 0.69% |
▷ Public methods | 110 | 75.86% |
▷ Protected methods | 21 | 14.48% |
▷ Private methods | 14 | 9.66% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/mhs-tm-close-button-white.png | 6.13KB | 2.79KB | ▼ 54.42% |
css/jquery-ui/images/ui-icons_555555_256x240.png | 6.91KB | 4.18KB | ▼ 39.47% |
css/jquery-ui/images/ui-icons_444444_256x240.png | 6.84KB | 4.18KB | ▼ 38.90% |
img/Pin-Star.png | 2.06KB | 1.17KB | ▼ 43.21% |
css/jquery-ui/images/ui-icons_ffffff_256x240.png | 6.17KB | 4.18KB | ▼ 32.17% |