67% wp-google-maps

Code Review | WP Go Maps (formerly WP Google Maps)

WordPress plugin WP Go Maps (formerly WP Google Maps) scored67%from 54 tests.

About plugin

  • Plugin page: wp-google-maps
  • Plugin version: 9.0.27
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2012
  • Latest release: Oct 11, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

2773 reviews

Install metrics

400,000+ active /21,796,222 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.11MB] [CPU: ▲32.25ms] Passed 4 tests

Server-side resources used by WP Go Maps (formerly WP Google Maps)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.94 ▲4.4869.60 ▲31.93
Dashboard /wp-admin7.96 ▲4.6276.25 ▲23.10
Posts /wp-admin/edit.php7.96 ▲4.6187.52 ▲38.71
Add New Post /wp-admin/post-new.php8.63 ▲2.74140.16 ▲35.24
Media Library /wp-admin/upload.php7.96 ▲4.7375.53 ▲41.78
Support /wp-admin/admin.php?page=wp-google-maps-menu-support7.9670.06
Maps /wp-admin/admin.php?page=wp-google-maps-menu7.9672.26
Settings /wp-admin/admin.php?page=wp-google-maps-menu-settings7.9679.10

Server storage [IO: ▲27.99MB] [DB: ▲0.02MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • The filesystem usage should be lower than 25MB (currently using 27.99MB)
Filesystem: 608 new files
Database: 9 new tables, 15 new options
New tables
wp_wpgmza_maps
wp_wpgmza_image_overlays
wp_wpgmza_circles
wp_wpgmza_polygon
wp_wpgmza_admin_notices
wp_wpgmza_polylines
wp_wpgmza
wp_wpgmza_rectangles
wp_wpgmza_point_labels
New WordPress options
WPGMZA_OTHER_SETTINGS
wpgmza_temp_api
wpgmza-first-run
widget_theysaidso_widget
widget_wpgmza_map_widget
wpgmza_xml_url
can_compress_scripts
widget_recent-comments
wpgmza_welcome_screen_done
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Go Maps (formerly WP Google Maps)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.25 ▼0.111.72 ▲0.0240.03 ▲1.81
Dashboard /wp-admin2,210 ▲325.56 ▼0.1884.69 ▼27.5983.84 ▲40.06
Posts /wp-admin/edit.php2,133 ▲331.99 ▼0.0237.00 ▼4.8933.29 ▼2.97
Add New Post /wp-admin/post-new.php1,788 ▲25327.80 ▲9.58782.85 ▲136.9040.39 ▼25.19
Media Library /wp-admin/upload.php1,427 ▲244.17 ▼0.0599.02 ▲4.7473.59 ▲30.54
Support /wp-admin/admin.php?page=wp-google-maps-menu-support1,2375.1272.7734.09
Maps /wp-admin/admin.php?page=wp-google-maps-menu1,3816.01100.9365.16
Settings /wp-admin/admin.php?page=wp-google-maps-menu-settings3,9546.82135.2764.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 9 tables
    • wp_wpgmza_image_overlays
    • wp_wpgmza_polygon
    • wp_wpgmza_circles
    • wp_wpgmza_polylines
    • wp_wpgmza
    • wp_wpgmza_maps
    • wp_wpgmza_admin_notices
    • wp_wpgmza_point_labels
    • wp_wpgmza_rectangles
  • The uninstall procedure has failed, leaving 15 options in the database
    • wpgmza_xml_location
    • widget_wpgmza_map_widget
    • wpgmza_welcome_screen_done
    • widget_recent-posts
    • widget_theysaidso_widget
    • WPGMZA_OTHER_SETTINGS
    • wpgmza-first-run
    • theysaidso_admin_options
    • can_compress_scripts
    • wpgmza_global_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-google-maps/html/atlas-novus/admin-notice-persistent.html.php
    • > /wp-content/plugins/wp-google-maps/html/admin-notice-persistent.html.php
    • > /wp-content/plugins/wp-google-maps/html/maps-engine-dialog.html.php
  • 64× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-google-maps/html/atlas-novus/map-edit-page/map-select-dialog.html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPGMZA\\FeaturePanel' not found in wp-content/plugins/wp-google-maps/includes/map-edit-page/class.polyline-panel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPGMZA\\Page' not found in wp-content/plugins/wp-google-maps/includes/class.installer-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-google-maps/html/atlas-novus/map-edit-page/rectangle-panel.html.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-google-maps/html/installer-page.html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-google-maps/html/map-edit-page/rectangle-panel.html.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPGMZA\\FeaturePanel' not found in wp-content/plugins/wp-google-maps/includes/map-edit-page/class.marker-panel.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-google-maps/html/atlas-novus/store-locator.html.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-google-maps/html/atlas-novus/styling-page.html.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-google-maps/html/atlas-novus/map-edit-page/heatmap-panel.html.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-google-maps/wpGoogleMaps.php 85% from 13 tests

This is the main PHP file of "WP Go Maps (formerly WP Google Maps)" version 9.0.27, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 277 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-google-maps.php" instead of "wpGoogleMaps.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin264,417 lines of code in 447 files:
LanguageFilesBlank linesComment linesLines of code
PO File3472,139160,703173,917
JavaScript14213,13916,65545,080
PHP1636,8003,65728,915
CSS352,32546214,003
JSON7012602,202
Markdown2760186
JSX13656114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.08
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes107
▷ Abstract classes00.00%
▷ Concrete classes107100.00%
▷ Final classes00.00%
Methods665
▷ Static methods527.82%
▷ Public methods49874.89%
▷ Protected methods14521.80%
▷ Private methods223.31%
Functions165
▷ Named functions14185.45%
▷ Anonymous functions2414.55%
Constants93
▷ Global constants99.68%
▷ Class constants8490.32%
▷ Public constants84100.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
76 compressed PNG files occupy 1.66MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/red.png41.78KB44.20KB0.00%
images/marker_iw_type_2.png1.66KB1.86KB0.00%
images/monochrome.png24.77KB26.77KB0.00%
images/icons8-google-maps-500.png15.39KB6.65KB▼ 56.79%
images/unlimited-markers.png30.95KB33.28KB0.00%