68% wp-google-map-plugin

Code Review | WordPress Plugin for Google Maps - WP MAPS

WordPress plugin WordPress Plugin for Google Maps - WP MAPS scored68%from 54 tests.

About plugin

  • Plugin page: wp-google-map-plugin
  • Plugin version: 4.5.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2013
  • Latest release: Nov 3, 2023
  • Number of updates: 209
  • Update frequency: every 18.6 days
  • Top authors: flippercode (100%)

Code review

54 tests

User reviews

119 reviews

Install metrics

90,000+ active /2,466,368 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.01MB] [CPU: ▼1.59ms] Passed 4 tests

Server-side resources used by WordPress Plugin for Google Maps - WP MAPS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.44 ▲0.9857.85 ▲16.02
Dashboard /wp-admin4.34 ▲0.9950.24 ▼15.03
Posts /wp-admin/edit.php4.44 ▲1.0951.64 ▲1.87
Add New Post /wp-admin/post-new.php6.92 ▲1.03101.98 ▲2.04
Media Library /wp-admin/upload.php4.25 ▲1.0342.56 ▲4.76

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 763 new files
Database: 3 new tables, 8 new options
New tables
wp_map_locations
wp_group_map
wp_create_map
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_wpgmp_google_map_widget_class
widget_theysaidso_widget
wpgmp_ignore_buy_pro
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Plugin for Google Maps - WP MAPS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12014.22 ▼0.191.78 ▼0.0943.09 ▲0.93
Dashboard /wp-admin2,281 ▲1015.53 ▼0.1496.97 ▲1.4886.73 ▲46.79
Posts /wp-admin/edit.php2,189 ▲891.98 ▲0.0439.71 ▼0.6534.88 ▼10.40
Add New Post /wp-admin/post-new.php1,600 ▲7422.68 ▼0.40682.58 ▲22.3859.80 ▲5.72
Media Library /wp-admin/upload.php1,486 ▲864.16 ▼0.0696.89 ▼0.4273.01 ▲31.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 3 tables
    • wp_group_map
    • wp_create_map
    • wp_map_locations
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpgmp_google_map_widget_class
    • wpgmp_ignore_buy_pro

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
The following issues need your attention
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-google-map-plugin/modules/drawing/views/manage.php
    • > /wp-content/plugins/wp-google-map-plugin/modules/route/views/manage.php
    • > /wp-content/plugins/wp-google-map-plugin/modules/route/views/form.php
    • > /wp-content/plugins/wp-google-map-plugin/wp-google-map-plugin.php
    • > /wp-content/plugins/wp-google-map-plugin/modules/tools/views/manage.php
    • > /wp-content/plugins/wp-google-map-plugin/modules/permissions/views/manage.php
  • 99× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_element() on null in wp-content/plugins/wp-google-map-plugin/modules/map/views/map-forms/map-style-setting-form.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPGMP_Template' not found in wp-content/plugins/wp-google-map-plugin/modules/overview/views/how.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_element() on null in wp-content/plugins/wp-google-map-plugin/modules/map/views/map-forms/additional-styling-form.php:8
    • > PHP Warning
      Use of undefined constant WPGMP_DIR - assumed 'WPGMP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-google-map-plugin/modules/permissions/views/manage.php on line 1
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/wp-google-map-plugin/modules/map/views/map-forms/custom-control-form.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_element() on null in wp-content/plugins/wp-google-map-plugin/modules/map/views/map-forms/listing-setting-form.php:7
    • > PHP Warning
      include_once(WPGMP_DIRinc/modals/pro.php): failed to open stream: No such file or directory in wp-content/plugins/wp-google-map-plugin/modules/tools/views/manage.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_element() on null in wp-content/plugins/wp-google-map-plugin/modules/map/views/map-forms/url-filter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPGMP_Model' not found in wp-content/plugins/wp-google-map-plugin/modules/group_map/views/form.php:9
    • > PHP Warning
      include_once(WPGMP_DIRinc/modals/pro.php): failed to open stream: No such file or directory in wp-content/plugins/wp-google-map-plugin/modules/drawing/views/manage.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-google-map-plugin/wp-google-map-plugin.php 92% from 13 tests

"WordPress Plugin for Google Maps - WP MAPS" version 4.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 191 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin61,208 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript165,7349,72924,783
PO File166,9927,42117,395
CSS1887962711,446
PHP721,8642,1906,783
SVG200700
HTML930101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity33.63
▷ Minimum class complexity1.00
▷ Maximum class complexity274.00
Average method complexity5.37
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods224
▷ Static methods4520.09%
▷ Public methods21595.98%
▷ Protected methods62.68%
▷ Private methods31.34%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
581 PNG files occupy 2.87MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/karate.png1.16KB0.89KB▼ 23.17%
assets/images/icons/horseriding.png1.24KB0.99KB▼ 19.91%
assets/images/icons/moderntower.png0.89KB0.61KB▼ 31.62%
assets/images/icons/historicalquarter.png0.78KB0.74KB▼ 5.16%
assets/images/icons/days-mar.png0.96KB0.68KB▼ 29.18%