67% gmap-embed

Code Review | Maps Plugin using Google Maps for WordPress - WP Google Map

WordPress plugin Maps Plugin using Google Maps for WordPress - WP Google Map scored67%from 54 tests.

About plugin

  • Plugin page: gmap-embed
  • Plugin version: 1.9.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-6.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2016
  • Latest release: Aug 15, 2023
  • Number of updates: 221
  • Update frequency: every 11.4 days
  • Top authors: milonfci (100%)

Code review

54 tests

User reviews

154 reviews

Install metrics

20,000+ active /826,078 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.77ms] Passed 4 tests

A check of server-side resources used by Maps Plugin using Google Maps for WordPress - WP Google Map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1144.29 ▲3.89
Dashboard /wp-admin3.42 ▲0.1245.58 ▼3.52
Posts /wp-admin/edit.php3.53 ▲0.1846.60 ▼2.11
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.47 ▼9.33
Media Library /wp-admin/upload.php3.34 ▲0.1139.04 ▲6.47
All Maps /wp-admin/admin.php?page=wpgmapembed3.3957.58
Add New /wp-admin/admin.php?page=wpgmapembed-new3.5842.17
Settings /wp-admin/admin.php?page=wpgmapembed-settings3.4345.69
Quick Setup /wp-admin/admin.php?page=wgm_setup_wizard3.4039.37
Support /wp-admin/admin.php?page=wpgmapembed-support3.3940.52

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 732 new files
Database: 2 new tables, 12 new options
New tables
wp_wgm_markers
wp_wgm_icons
New WordPress options
db_upgraded
gmap_embed_activation_time
widget_recent-comments
_wgm_db_version
widget_theysaidso_widget
theysaidso_admin_options
widget_srmgmap_widget
widget_recent-posts
can_compress_scripts
_wgm_p_v_migration
...

Browser metrics Passed 4 tests

Maps Plugin using Google Maps for WordPress - WP Google Map: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲25514.53 ▼0.0317.69 ▲16.1730.10 ▼14.06
Dashboard /wp-admin2,311 ▲1345.57 ▼0.1084.42 ▼11.0880.18 ▲35.73
Posts /wp-admin/edit.php2,220 ▲1202.00 ▼0.0333.51 ▼1.4336.68 ▲0.04
Add New Post /wp-admin/post-new.php1,803 ▲27722.90 ▼0.62709.13 ▲29.3939.75 ▼12.92
Media Library /wp-admin/upload.php1,510 ▲1134.11 ▼0.08105.29 ▲5.2367.04 ▲21.14
All Maps /wp-admin/admin.php?page=wpgmapembed1,3744.89101.1499.40
Add New /wp-admin/admin.php?page=wpgmapembed-new2,34610.02250.13172.50
Settings /wp-admin/admin.php?page=wpgmapembed-settings2,7513.3740.8770.55
Quick Setup /wp-admin/admin.php?page=wgm_setup_wizard2,5863.2840.8365.89
Support /wp-admin/admin.php?page=wpgmapembed-support1,90810.24276.36107.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_wgm_markers
    • wp_wgm_icons
  • This plugin does not fully uninstall, leaving 12 options in the database
    • gmap_embed_activation_time
    • widget_recent-comments
    • _wgm_db_version
    • widget_srmgmap_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • _wgm_migration_multiple_marker
    • db_upgraded
    • _wgm_p_v_migration
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _wgm_is_premium() in wp-content/plugins/gmap-embed/admin/includes/markers-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/gmap-embed/admin/includes/markers-icons.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _wgm_is_premium() in wp-content/plugins/gmap-embed/admin/includes/map_theme_presets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/gmap-embed/admin/includes/wpgmap_setup_wizard.php:6

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=wpgmapembed-new
    • > Console-api (severe) in unknown
    https://maps.google.com/maps/api/js?key&libraries=places&language=en&region=US&callback=Function.prototype&ver=6.3.1 153:248 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
    • > GET request to /wp-admin/admin.php?page=wpgmapembed-new
    • > Javascript (severe) in unknown
    https://maps.google.com/maps-api-v3/api/js/54/10/controls.js 81:501 Uncaught TypeError: Cannot read properties of null (reading 'set')

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (WP Google Map menu in the left sidebar.) image not found
You can look at the official readme.txt

gmap-embed/srm_gmap_embed.php 85% from 13 tests

The primary PHP file in "Maps Plugin using Google Maps for WordPress - WP Google Map" version 1.9.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gmap-embed.php" instead of "srm_gmap_embed.php")
  • Description: The description should be shorter than 140 characters (currently 252 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin17,720 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP393444333,795
JavaScript102663992,051
CSS7171401,138
PO File10409458953
JSON100237

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.95
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces2
Interfaces0
Traits15
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods74
▷ Static methods11.35%
▷ Public methods7195.95%
▷ Protected methods00.00%
▷ Private methods34.05%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
635 PNG files occupy 0.81MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/markers/icons/star_pin_green.png2.37KB1.86KB▼ 21.70%
admin/assets/images/markers/icons/speed50.png1.34KB0.94KB▼ 29.64%
admin/assets/images/markers/icons/arch.png0.89KB0.60KB▼ 32.64%
admin/assets/images/markers/icons/museum-naval.png0.91KB0.86KB▼ 4.74%
admin/assets/images/markers/icons/police2.png0.92KB0.63KB▼ 30.78%