62% google-maps-easy

Code Review | Easy Google Maps

WordPress plugin Easy Google Maps scored 62% from 54 tests.

About plugin

  • Plugin page: google-maps-easy
  • Plugin version: 1.11.10
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 5, 2015
  • Latest release: Sep 14, 2023
  • Number of updates: 160
  • Update frequency: every 19.6 days
  • Top authors: supsystic.com (100%)

Code review

54 tests

User reviews

251 reviews

Install metrics

30,000+ active / 1,181,529 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.82MB] [CPU: ▲12.17ms] Passed 4 tests

This is a short check of server-side resources used by Easy Google Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.61 ▲2.1568.79 ▲30.09
Dashboard /wp-admin5.13 ▲1.8264.55 ▲17.61
Posts /wp-admin/edit.php5.18 ▲1.8258.75 ▲13.28
Add New Post /wp-admin/post-new.php7.71 ▲1.8295.08 ▼3.69
Media Library /wp-admin/upload.php5.05 ▲1.8256.17 ▲21.49
All Maps /wp-admin/admin.php?page=google-maps-easy&tab=gmap5.3658.03
Overview /wp-admin/admin.php?page=google-maps-easy&tab=overview5.63370.74
Marker Categories /wp-admin/admin.php?page=google-maps-easy&tab=marker_groups5.4671.19
Settings /wp-admin/admin.php?page=google-maps-easy&tab=settings5.3854.53
Add Map /wp-admin/admin.php?page=google-maps-easy&tab=gmap_add_new8.76108.79
Easy Google Maps /wp-admin/admin.php?page=google-maps-easy5.3662.60

Server storage [IO: ▲8.28MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 488 new files
Database: 11 new tables, 10 new options
New tables
wp_gmp_marker_groups_relation
wp_gmp_usage_stat
wp_gmp_markers
wp_gmp_modules
wp_gmp_icons
wp_gmp_maps
wp_gmp_modules_type
wp_gmp_options
wp_gmp_marker_groups
wp_gmp_options_categories
...
New WordPress options
gmp_plugin_activation_errors
theysaidso_admin_options
wp_gmp_db_installed
gmp_def_icons_installed
widget_recent-comments
widget_theysaidso_widget
db_upgraded
wp_gmp_db_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Easy Google Maps: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.46 ▼0.784.76 ▲2.8541.36 ▼3.99
Dashboard /wp-admin2,250 ▲595.81 ▲0.9398.26 ▼13.7340.76 ▼0.24
Posts /wp-admin/edit.php2,133 ▲442.13 ▲0.1034.56 ▼1.1531.81 ▲1.15
Add New Post /wp-admin/post-new.php1,571 ▲5723.22 ▲5.70678.39 ▲14.4660.44 ▼4.99
Media Library /wp-admin/upload.php1,435 ▲474.31 ▲0.12111.72 ▼0.3449.09 ▼0.18
All Maps /wp-admin/admin.php?page=google-maps-easy&tab=gmap1,8065.3982.41132.47
Overview /wp-admin/admin.php?page=google-maps-easy&tab=overview2,92320.89524.9690.20
Marker Categories /wp-admin/admin.php?page=google-maps-easy&tab=marker_groups1,3804.1564.0692.05
Settings /wp-admin/admin.php?page=google-maps-easy&tab=settings1,5954.4563.0184.60
Add Map /wp-admin/admin.php?page=google-maps-easy&tab=gmap_add_new8,42011.85322.47217.17
Easy Google Maps /wp-admin/admin.php?page=google-maps-easy1,8015.3679.56101.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 11 tables in the database
    • wp_gmp_modules
    • wp_gmp_options_categories
    • wp_gmp_modules_type
    • wp_gmp_icons
    • wp_gmp_marker_groups_relation
    • wp_gmp_marker_groups
    • wp_gmp_membership_presets
    • wp_gmp_usage_stat
    • wp_gmp_options
    • wp_gmp_maps
    • ...
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • wp_gmp_db_installed
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • wp_gmp_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • gmp_def_icons_installed
    • gmp_plugin_activation_errors

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/google-maps-easy/modules/gmap_widget/views/tpl/widget.php
    • > /wp-content/plugins/google-maps-easy/modules/supsystic_promo/views/tpl/adminFooter.php
  • 91× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'moduleGmp' not found in wp-content/plugins/google-maps-easy/modules/icons/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleGmp' not found in wp-content/plugins/google-maps-easy/modules/mail/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'modelGmp' not found in wp-content/plugins/google-maps-easy/modules/supsystic_promo/models/supsystic_promo.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/google-maps-easy/modules/supsystic_promo/views/tpl/adminPromoTabContent.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'modelGmp' not found in wp-content/plugins/google-maps-easy/modules/marker_groups/models/marker_groups.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'baseObjectGmp' not found in wp-content/plugins/google-maps-easy/classes/view.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/google-maps-easy/modules/gmap_widget/views/tpl/form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleGmp' not found in wp-content/plugins/google-maps-easy/modules/shortcodes/mod.php:2
    • > PHP Warning
      Use of undefined constant GMP_PLUGINS_URL - assumed 'GMP_PLUGINS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/google-maps-easy/modules/supsystic_promo/views/tpl/overviewTabContent.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/google-maps-easy/modules/marker_groups/views/tpl/mgrAdmin.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=google-maps-easy&tab=gmap_add_new
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key&language=en&ver=1.11.10 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 96% 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
5 plugin tags: map, google maps, location, map markers, google map

google-maps-easy/gmp.php 92% from 13 tests

The main file in "Easy Google Maps" v. 1.11.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-maps-easy.php" instead of "gmp.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
There were no executable files found in this plugin65,585 lines of code in 265 files:
LanguageFilesBlank linesComment linesLines of code
PO File1812,10517,98831,679
PHP1095462,09815,226
JavaScript1006842,55312,566
CSS361622443,206
SVG1002,671
JSON100237

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity25.79
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes82
▷ Abstract classes78.54%
▷ Concrete classes7591.46%
▷ Final classes00.00%
Methods912
▷ Static methods24626.97%
▷ Public methods82190.02%
▷ Protected methods525.70%
▷ Private methods394.28%
Functions21
▷ Named functions1676.19%
▷ Anonymous functions523.81%
Constants74
▷ Global constants6081.08%
▷ Class constants1418.92%
▷ Public constants14100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
177 PNG files occupy 0.96MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/icons/icons_files/def_icons/marker_1.png1.18KB0.86KB▼ 26.99%
modules/icons/icons_files/def_icons/paw_gray.png2.02KB1.90KB▼ 5.91%
modules/icons/icons_files/def_icons/star_pin_black.png1.79KB1.74KB▼ 3.16%
modules/icons/icons_files/def_icons/green_circle.png2.10KB1.72KB▼ 18.15%
img/buttonsPlusMinus.png2.81KB0.17KB▼ 93.88%