77% google-maps-widget

Code Review | Maps Widget for Google Maps

WordPress plugin Maps Widget for Google Maps scored77%from 54 tests.

About plugin

  • Plugin page: google-maps-widget
  • Plugin version: 4.25
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2012
  • Latest release: Aug 10, 2023
  • Number of updates: 384
  • Update frequency: every 10.5 days
  • Top authors: WebFactory (99.48%)

Code review

54 tests

User reviews

508 reviews

Install metrics

50,000+ active /2,355,279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.47MB] [CPU: ▼3.10ms] Passed 4 tests

A check of server-side resources used by Maps Widget for Google Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4643.34 ▲0.47
Dashboard /wp-admin3.78 ▲0.4458.23 ▼9.88
Posts /wp-admin/edit.php3.88 ▲0.5354.82 ▲1.35
Add New Post /wp-admin/post-new.php6.38 ▲0.4993.50 ▼3.08
Media Library /wp-admin/upload.php3.70 ▲0.4836.82 ▲0.10
Maps Widget for Google Maps /wp-admin/options-general.php?page=gmw_options3.7039.69

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
gmw_options
theysaidso_admin_options
can_compress_scripts
widget_googlemapswidget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Maps Widget for Google Maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲7313.57 ▼0.784.46 ▲2.2441.32 ▼2.99
Dashboard /wp-admin2,262 ▲885.66 ▼0.0294.46 ▼22.1745.24 ▼5.05
Posts /wp-admin/edit.php2,170 ▲672.31 ▲0.3645.96 ▲3.0840.48 ▲5.25
Add New Post /wp-admin/post-new.php1,557 ▲3123.35 ▲0.43692.22 ▲12.6752.88 ▼2.81
Media Library /wp-admin/upload.php1,470 ▲764.39 ▲0.16111.45 ▲8.4548.59 ▲3.84
Maps Widget for Google Maps /wp-admin/options-general.php?page=gmw_options1,4824.2481.2936.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • gmw_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_googlemapswidget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/google-maps-widget/google-maps-widget.php:34

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=gmw_options
    • > Console-api (warning) in unknown
    http://maps.google.com/maps/api/js?key=AIzaSyBvCK51-6tqdH0gu_lsUK8SxlGrvfUzIfo&ver=4.25 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 86% from 29 tests

readme.txt 94% 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:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

google-maps-widget/google-maps-widget.php 77% from 13 tests

The principal PHP file in "Maps Widget for Google Maps" v. 4.25 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")
  • Domain Path: The domain path must begin with a forward slash character ("/lang")
  • Description: The description should be shorter than 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,361 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP33721351,763
CSS318623993
JavaScript616379605

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity94.00
▷ Minimum class complexity42.00
▷ Maximum class complexity146.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods51
▷ Static methods4690.20%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-unlimited.png1.27KB1.51KB0.00%
images/colorbox/dark/border.png0.07KB0.10KB0.00%
images/gmw-logo-pro-dialog.png38.70KB19.24KB▼ 50.27%
images/icon-trial.png1.10KB1.10KB0.00%
images/icon-yearly.png0.90KB0.89KB▼ 1.40%