10% store-locator

Code Review | Store Locator for WordPress with Google Maps – LotsOfLocales

WordPress plugin Store Locator for WordPress with Google Maps – LotsOfLocales scored10%from 54 tests.

About plugin

  • Plugin page: store-locator
  • Plugin version: 3.98.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2009
  • Latest release: Mar 15, 2023
  • Number of updates: 635
  • Update frequency: every 8.2 days
  • Top authors: viadat (72.76%)moaluko (27.4%)

Code review

54 tests

User reviews

222 reviews

Install metrics

1,000+ active /308,508 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/store-locator/sl-functions.php+59
    chmod() expects parameter 1 to be a valid path, resource given

Server metrics [RAM: ▼1.00MB] [CPU: ▼50.83ms] Passed 4 tests

This is a short check of server-side resources used by Store Locator for WordPress with Google Maps – LotsOfLocales
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.99 ▼0.4712.37 ▼27.03
Dashboard /wp-admin3.02 ▼0.3312.47 ▼46.50
Posts /wp-admin/edit.php3.02 ▼0.3412.99 ▼42.04
Add New Post /wp-admin/post-new.php3.02 ▼2.8711.68 ▼87.73
Media Library /wp-admin/upload.php3.02 ▼0.2112.43 ▼19.42
MapDesigner /wp-admin/admin.php?page=store-locator/sl-admin/pages/mapdesigner.php3.0213.04
Locations /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php3.0212.27
News & Upgrades /wp-admin/admin.php?page=store-locator/sl-admin/pages/information.php3.0212.86

Server storage [IO: ▲1.40MB] [DB: ▲0.11MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 165 new files
Database: 3 new tables, 6 new options
New tables
wp_sl_setting
wp_store_locator
wp_sl_tag
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Store Locator for WordPress with Google Maps – LotsOfLocales: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,114 ▲36815.87 ▲1.6749.26 ▲47.5239.45 ▼2.45
Dashboard /wp-admin2,333 ▲1424.91 ▼0.95109.70 ▲9.9180.48 ▲40.71
Posts /wp-admin/edit.php2,132 ▲431.98 ▼0.0334.16 ▼7.8634.37 ▼0.77
Add New Post /wp-admin/post-new.php1,709 ▲19022.16 ▼1.15738.57 ▲71.6848.54 ▼15.69
Media Library /wp-admin/upload.php1,428 ▲404.22 ▲0.0195.25 ▼13.1274.32 ▲25.91
MapDesigner /wp-admin/admin.php?page=store-locator/sl-admin/pages/mapdesigner.php2,6861.9630.1684.64
Locations /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php1,5061.7927.0938.31
News & Upgrades /wp-admin/admin.php?page=store-locator/sl-admin/pages/information.php2,2171.8226.3081.39

Uninstaller [IO: ▲0.81MB] [DB: ▲0.11MB] 25% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+1085
    unserialize(): Error at offset 0 of 1 bytes
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_store_locator
    • wp_sl_tag
    • wp_sl_setting
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/information.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+1085
    unserialize(): Error at offset 0 of 1 bytes
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+336
    Undefined index: start
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+320
    Undefined index: google_map_country
  • 96 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+326
    Undefined index: map_region
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+329
    Undefined index: map_language
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+63
    Undefined index: zoom_level
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+68
    Undefined index: use_city_search
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+71
    Undefined index: remove_credits
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+72
    Undefined index: load_locations_default
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+73
    Undefined index: map_overview_control
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+74
    Undefined index: geolocate
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+75
    Undefined index: load_results_with_locations_default
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+98
    Undefined index: map_type
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+222
    Undefined index: icon
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+222
    Undefined index: icon2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+157
    Undefined index: num_initial_displayed
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+174
    Undefined index: search_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+176
    Undefined index: radius_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+178
    Undefined index: website_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+180
    Undefined index: directions_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+182
    Undefined index: map_link_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+184
    Undefined index: instruction_message
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+186
    Undefined index: city_dropdown_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+188
    Undefined index: location_not_found_message
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+190
    Undefined index: no_results_found_message
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+192
    Undefined index: hours_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+194
    Undefined index: phone_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+196
    Undefined index: fax_label
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+198
    Undefined index: email_label
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+204
    Undefined index: height
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+204
    Undefined index: height_units
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+204
    Undefined index: width
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+204
    Undefined index: width_units
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+211
    Undefined index: distance_unit
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-inc/includes/mapdesigner-options.php+214
    Undefined index: radii
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/information.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+1267
    Undefined index: debug
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+313
    Undefined index: sensor
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+317
    Undefined index: api_key
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+323
    Undefined index: google_map_domain
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+332
    Undefined index: map_character_encoding
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+339
    Undefined index: name
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+343
    Undefined index: admin_locations_per_page
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/locations.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+346
    Undefined index: location_table_view
    • > GET request to /wp-admin/admin.php?page=store-locator/sl-admin/pages/information.php
    • > Notice in wp-content/plugins/store-locator/sl-functions.php+1754
    Undefined index: sl_pt_data_time

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: maps, business locations, geocoding, store locator, google maps

store-locator/store-locator.php 92% from 13 tests

The principal PHP file in "Store Locator for WordPress with Google Maps – LotsOfLocales" v. 3.98.8.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 251 characters long)

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
Success! There were no dangerous files found in this plugin12,215 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PO File202,7363,8156,090
PHP386208434,641
CSS330132851
JavaScript118395633

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.49
Average class complexity23.50
▷ Minimum class complexity10.00
▷ Maximum class complexity37.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions88
▷ Named functions8394.32%
▷ Anonymous functions55.68%
Constants93
▷ Global constants93100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
62 PNG files occupy 0.33MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/house_sign.png0.82KB0.44KB▼ 46.32%
icons/board_green.png0.77KB0.64KB▼ 16.90%
images/prettyPhoto/light_rounded/btnPrevious.png1.41KB1.19KB▼ 15.74%
icons/green_flag.png0.85KB1.11KB0.00%
images/prettyPhoto/facebook/btnPrevious.png0.81KB0.58KB▼ 27.90%