84% wp-map-route-planner

Code Review | WP Map Route Planner

WordPress plugin WP Map Route Planner scored84%from 54 tests.

About plugin

  • Plugin page: wp-map-route-planner
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Aug 8, 2017
  • Latest release: Aug 27, 2020
  • Number of updates: 7
  • Update frequency: every 160.3 days
  • Top authors: vsourz1td (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /5,232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼11.06ms] Passed 4 tests

Analyzing server-side resources used by WP Map Route Planner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.23 ▼2.04
Dashboard /wp-admin3.38 ▲0.0847.20 ▼3.65
Posts /wp-admin/edit.php3.50 ▲0.1447.91 ▲1.83
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.08 ▼40.38
Media Library /wp-admin/upload.php3.31 ▲0.0835.55 ▲3.24
Route Planner /wp-admin/admin.php?page=delivery_route_planner3.3232.60
Map Settings /wp-admin/admin.php?page=rp_setting3.3032.85

Server storage [IO: ▲1.41MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Map Route Planner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.17 ▼1.211.58 ▼0.1039.72 ▼4.08
Dashboard /wp-admin2,230 ▲424.83 ▼0.1996.46 ▼3.5237.52 ▼5.53
Posts /wp-admin/edit.php2,119 ▲332.04 ▼0.0041.42 ▲1.5838.05 ▲4.10
Add New Post /wp-admin/post-new.php1,537 ▼723.36 ▲4.99579.96 ▼53.3045.53 ▼7.16
Media Library /wp-admin/upload.php1,418 ▲304.17 ▼0.04100.95 ▼4.2843.24 ▼1.31
Route Planner /wp-admin/admin.php?page=delivery_route_planner1,0592.4245.0436.36
Map Settings /wp-admin/admin.php?page=rp_setting9851.8328.3631.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=delivery_route_planner
    • > Console-api (warning) in unknown
    https://maps.google.com/maps/api/js?key=&sensor=false 210: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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: google map, route planning, google map route, woo-commerce order route, route...

wp-map-route-planner/wp-map-route-planner.php 85% from 13 tests

Analyzing the main PHP file in "WP Map Route Planner" version 1.0.0
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected11,097 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript96684144,063
CSS10101793,987
PHP182756902,392
SVG100655

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/marker_blue.png1.36KB0.57KB▼ 57.70%
admin/images/marker_green.png1.37KB0.58KB▼ 57.60%
admin/images/marker_red.png1.38KB0.59KB▼ 57.34%