62% google-map-locations

Code Review | Google Map Locations

WordPress plugin Google Map Locations scored62%from 54 tests.

About plugin

  • Plugin page: google-map-locations
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Sep 20, 2013
  • Latest release: Dec 29, 2014
  • Number of updates: 44
  • Update frequency: every 11.1 days
  • Top authors: dswpsupport (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /16,796 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.89ms] Passed 4 tests

Server-side resources used by Google Map Locations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.12 ▼8.01
Dashboard /wp-admin3.38 ▲0.0749.73 ▲1.24
Posts /wp-admin/edit.php3.43 ▲0.0750.42 ▲0.92
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.59 ▼5.69
Media Library /wp-admin/upload.php3.30 ▲0.0737.09 ▲1.39
Settings /wp-admin/admin.php?page=gml-settings3.2429.56
Add New Location /wp-admin/admin.php?page=add-location3.2830.61
Google Map Locations /wp-admin/admin.php?page=google-map-location3.2929.47

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: 2 new tables, 6 new options
New tables
wp_gml_locations
wp_gml_settings
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Google Map Locations
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.17 ▼1.205.66 ▲3.6342.88 ▼5.86
Dashboard /wp-admin2,243 ▲554.86 ▼0.0395.60 ▼18.5466.60 ▲22.13
Posts /wp-admin/edit.php2,123 ▲342.01 ▲0.0236.78 ▲0.5635.58 ▲0.87
Add New Post /wp-admin/post-new.php1,549 ▲1623.12 ▼0.23712.34 ▲24.5669.17 ▲15.00
Media Library /wp-admin/upload.php1,422 ▲344.13 ▼0.0796.03 ▼9.4782.78 ▲38.17
Settings /wp-admin/admin.php?page=gml-settings9552.0834.5829.20
Add New Location /wp-admin/admin.php?page=add-location9692.0322.8526.45
Google Map Locations /wp-admin/admin.php?page=google-map-location8892.0426.5925.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_gml_settings
    • wp_gml_locations
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/google-map-locations.php+219
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=google-map-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_location_list.php+49
    Undefined index: trashed
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+48
    Undefined index: name
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+54
    Undefined index: address_one
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+61
    Undefined index: address_two
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+68
    Undefined index: postcode
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+74
    Undefined index: phone
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+80
    Undefined index: email
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+86
    Undefined index: latitude
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+93
    Undefined index: longitude
    • > GET request to /wp-admin/admin.php?page=add-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_add_location.php+100
    Undefined index: description
    • > GET request to /wp-admin/admin.php?page=google-map-location
    • > Notice in wp-content/plugins/google-map-locations/admin_views/gml_location_list.php+113
    Undefined variable: cid

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
Please fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/google-map-locations/admin_views/gml_edit_settings.php
    • > /wp-content/plugins/google-map-locations/admin_views/gml_edit_location.php
    • > /wp-content/plugins/google-map-locations/admin_views/gml_add_location.php
    • > /wp-content/plugins/google-map-locations/admin_views/gml_location_list.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/google-map-locations/google-map-locations.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Tags: There are too many tags (23 tag instead of maximum 10)
You can look at the official readme.txt

google-map-locations/google-map-locations.php Passed 13 tests

The entry point to "Google Map Locations" version 1.0 is a PHP file that has certain tags in its header comment area
65 characters long description:
This plugin lets you add a google map with locations with bubble.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,155 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6166100977
JavaScript2343174
CSS1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pointers/restaurents.png1.71KB1.51KB▼ 11.56%
images/pointers/airport.png1.45KB0.55KB▼ 61.85%
images/pointers/city.png1.49KB0.72KB▼ 51.93%
images/pointers/shoppingmolls.png1.42KB1.30KB▼ 8.50%
images/pointers/institutions.png1.51KB1.48KB▼ 1.68%