68% wd-google-maps

Code Review | 10Web Map Builder for Google Maps

WordPress plugin 10Web Map Builder for Google Maps scored68%from 54 tests.

About plugin

  • Plugin page: wd-google-maps
  • Plugin version: 1.0.74
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Sep 13, 2023
  • Number of updates: 160
  • Update frequency: every 16.9 days
  • Top authors: webdorado (72.5%)10web (28.13%)

Code review

54 tests

User reviews

91 reviews

Install metrics

9,000+ active /501,129 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▼2.56ms] Passed 4 tests

Server-side resources used by 10Web Map Builder for Google Maps
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2543.87 ▲3.70
Dashboard /wp-admin4.11 ▲0.8054.13 ▲7.18
Posts /wp-admin/edit.php4.11 ▲0.7553.13 ▲1.26
Add New Post /wp-admin/post-new.php6.72 ▲0.8381.65 ▼19.56
Media Library /wp-admin/upload.php3.98 ▲0.7438.66 ▲4.38
Maps /wp-admin/admin.php?page=maps_gmwd4.5142.60
Uninstall /wp-admin/admin.php?page=uninstall_gmwd3.9739.04
Options /wp-admin/admin.php?page=options_gmwd3.9847.28
Marker Categories /wp-admin/admin.php?page=markercategories_gmwd3.9440.26
Themes /wp-admin/admin.php?page=themes_gmwd3.9540.80
Google Maps Add-ons /wp-admin/admin.php?page=gmwd_addons3.9237.93

Server storage [IO: ▲5.39MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 262 new files
Database: 11 new tables, 9 new options
New tables
wp_gmwd_rectangles
wp_gmwd_markers
wp_gmwd_maps
wp_gmwd_options
wp_gmwd_markercategories
wp_gmwd_polygons
wp_gmwd_polylines
wp_gmwd_mapstyles
wp_gmwd_themes
wp_gmwd_circles
...
New WordPress options
gmwd_admin_notice
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
gmwd_download_markers
can_compress_scripts
widget_gmwd_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for 10Web Map Builder for Google Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,119 ▲38416.93 ▲2.6225.96 ▲24.0340.03 ▼3.41
Dashboard /wp-admin2,408 ▲2237.43 ▲2.38155.61 ▲39.6838.84 ▼5.30
Posts /wp-admin/edit.php2,322 ▲2334.05 ▲1.9973.70 ▲28.3332.72 ▼2.22
Add New Post /wp-admin/post-new.php6,247 ▲4,72826.62 ▲3.63965.44 ▲350.3940.31 ▼30.82
Media Library /wp-admin/upload.php1,458 ▲735.19 ▲1.03103.40 ▲6.6541.12 ▼3.88
Maps /wp-admin/admin.php?page=maps_gmwd1,4353.8574.97158.16
Uninstall /wp-admin/admin.php?page=uninstall_gmwd1,2313.7564.0461.03
Options /wp-admin/admin.php?page=options_gmwd2,2547.65160.16151.22
Marker Categories /wp-admin/admin.php?page=markercategories_gmwd1,1583.7549.5391.75
Themes /wp-admin/admin.php?page=themes_gmwd1,2203.6954.0496.55
Google Maps Add-ons /wp-admin/admin.php?page=gmwd_addons1,0453.6049.7173.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 11 tables in the database
    • wp_gmwd_polylines
    • wp_gmwd_themes
    • wp_gmwd_shortcodes
    • wp_gmwd_maps
    • wp_gmwd_polygons
    • wp_gmwd_options
    • wp_gmwd_circles
    • wp_gmwd_mapstyles
    • wp_gmwd_rectangles
    • wp_gmwd_markers
    • ...
  • The uninstall procedure has failed, leaving 9 options in the database
    • gmwd_admin_notice
    • theysaidso_admin_options
    • gmwd_download_markers
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_gmwd_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDModel' not found in wp-content/plugins/wd-google-maps/admin/models/GMWDModelUninstall_gmwd.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wd-google-maps/preview.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wd-google-maps/wd-google-maps.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDModel' not found in wp-content/plugins/wd-google-maps/admin/models/GMWDModelMaps_gmwd.php:3
    • > PHP Notice
      Undefined variable: wd_options in wp-content/plugins/wd-google-maps/wd/templates/display_deactivation_popup.php on line 4
    • > PHP Notice
      Trying to get property 'wd_url_img' of non-object in wp-content/plugins/wd-google-maps/wd/templates/display_deactivation_popup.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDView' not found in wp-content/plugins/wd-google-maps/admin/views/GMWDViewShortcode_gmwd.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDController' not found in wp-content/plugins/wd-google-maps/admin/controllers/GMWDControllerThemes_gmwd.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDController' not found in wp-content/plugins/wd-google-maps/admin/controllers/GMWDControllerMaps_gmwd.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GMWDControllerFrontend' not found in wp-content/plugins/wd-google-maps/frontend/controllers/GMWDControllerFrontendMap.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=markercategories_gmwd
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places%2Cgeometry&sensor=false&v=3.exp&key=AIzaSyCzvhE5_lt5l0fYYChF1TpRtfFTjXpYkVI&ver=6.3.1 243: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"
    • > GET request to /wp-admin/admin.php?page=uninstall_gmwd
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places%2Cgeometry&sensor=false&v=3.exp&key=AIzaSyAmYQInD-coq0G5wC_D9h7uHjGeHhSSR4o&ver=6.3.1 243: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"
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=themes_gmwd
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places%2Cgeometry&sensor=false&v=3.exp&key=AIzaSyBMWPhZdxcpwpfXBrGPGmz8zMjwJJt83mc&ver=6.3.1 243: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"
    • > GET request to /wp-admin/admin.php?page=options_gmwd
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places%2Cgeometry&sensor=false&v=3.exp&key=AIzaSyBMWPhZdxcpwpfXBrGPGmz8zMjwJJt83mc&ver=6.3.1 161:248 "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started"
    • > GET request to /wp-admin/admin.php?page=gmwd_addons
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places%2Cgeometry&sensor=false&v=3.exp&key=%09AIzaSyDi6aVWxOVptj9WZZYeAgdAA1xpqAR1mnw&ver=6.3.1 243: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 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #9 (10Web Google Maps - Google Maps Store locator), #10 (10Web Google Maps - Google Maps Polygons and Polylines)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

wd-google-maps/wd-google-maps.php Passed 13 tests

The principal PHP file in "10Web Map Builder for Google Maps" v. 1.0.74 is loaded by WordPress automatically on each request
133 characters long description:
10Web Google Maps is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin36,896 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PO File148,20613,23217,515
CSS15208289,008
PHP599441,2576,431
JavaScript186084483,812
Markdown120093
SVG40037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.32
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes00.00%
▷ Concrete classes50100.00%
▷ Final classes00.00%
Methods197
▷ Static methods199.64%
▷ Public methods15980.71%
▷ Protected methods157.61%
▷ Private methods2311.68%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
124 PNG files occupy 2.81MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/marker_clusters.png4.90KB2.51KB▼ 48.79%
wd/assets/img/wds_main_plugin.png5.66KB3.74KB▼ 34.04%
images/css/i-add-polygon.png0.75KB0.77KB0.00%
images/css/add-new-blue.png0.52KB0.31KB▼ 40.60%
images/css/rectangle-tab.png1.77KB1.63KB▼ 8.06%