45% vo-locator-the-wp-store-locator

Code Review | VO Store Locator - WP Store Locator Plugin

WordPress plugin VO Store Locator - WP Store Locator Plugin scored 45% from 54 tests.

About plugin

  • Plugin page: vo-locator-the-wp...
  • Plugin version: 3.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2
  • WordPress version: 5.9.2
  • First release: Jul 23, 2015
  • Latest release: Jun 5, 2019
  • Number of updates: 144
  • Update frequency: every 9.8 days
  • Top authors: Jurski (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

400+ active / 20,318 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.37MB] [CPU: ▼319.29ms] Passed 4 tests

Server-side resources used by VO Store Locator - WP Store Locator Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.74 ▲4.2325.63 ▼27.58
Dashboard /wp-admin7.76 ▲4.3526.67 ▼7.36
Posts /wp-admin/edit.php7.76 ▲4.1226.50 ▼10.47
Add New Post /wp-admin/post-new.php7.76 ▲0.7925.59 ▼1,231.75
Media Library /wp-admin/upload.php7.76 ▲4.47199.91 ▲175.18
Edit Tag /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-tags.php7.7628.31
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius7.7625.42
Edit Location /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php7.7625.99
Add Tags /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-tags.php7.7625.11
Add Location /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php7.7624.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 496 new files
Database: 7 new tables, 5 new options
New tables
wp_vosl_tags_locations
wp_vosl_custom_fields
wp_vosl_tags
vosl_people
wp_vostore_locator
wp_vosl_setting
wp_vosl_store_custom_fields
New WordPress options
fs_debug_mode
fs_active_plugins
fs_gdpr
fs_accounts
fs_api_cache

Browser metrics Passed 4 tests

This is an overview of browser requirements for VO Store Locator - WP Store Locator Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,985 ▲23117.27 ▲1.136.31 ▼0.072.41 ▼0.21
Dashboard /wp-admin3,082 ▲2247.81 ▲1.71138.94 ▼2.21193.22 ▲28.95
Posts /wp-admin/edit.php2,898 ▲2044.80 ▲1.4578.56 ▲16.68169.13 ▲22.82
Add New Post /wp-admin/post-new.php1,726 ▼5521.32 ▲3.80422.99 ▼15.94191.96 ▲31.77
Media Library /wp-admin/upload.php1,896 ▲1987.15 ▲1.64141.89 ▼5.52217.21 ▲27.74
Edit Tag /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-tags.php1,4774.6690.37130.50
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,5344.0170.94151.58
Edit Location /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php2,5398.80138.34287.05
Add Tags /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-tags.php1,4594.7184.82127.41
Add Location /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php2,5578.89140.54250.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-functions.php+48
    unserialize(): Error at offset 0 of 3 bytes
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_vosl_custom_fields
    • wp_vosl_setting
    • vosl_people
    • wp_vosl_tags_locations
    • wp_vostore_locator
    • wp_vosl_tags
    • wp_vosl_store_custom_fields
  • This plugin does not fully uninstall, leaving 5 options in the database
    • fs_gdpr
    • fs_api_cache
    • fs_active_plugins
    • fs_accounts
    • fs_debug_mode

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-functions.php+48
    unserialize(): Error at offset 0 of 3 bytes
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/classes/vosl-locator-admin.php+1071
    Undefined index: HTTPS
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+110
    Undefined index: id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-inc/actions/processLocationData.php+19
    Undefined index: deltID
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-inc/actions/processLocationData.php+26
    Undefined index: delID
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-tags.php
    • > Warning in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-tags.php+17
    Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+21
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+46
    Undefined index: show_address_publicly
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+59
    Undefined index: store_name
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+62
    Undefined index: address
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+63
    Undefined index: address2
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+66
    Undefined index: city
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+67
    Undefined index: state
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+68
    Undefined index: zip
  • 93 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+76
    Undefined index: country
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+90
    Undefined index: latitude
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+91
    Undefined index: longitude
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+96
    Undefined variable: show_directions
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php+151
    Undefined index: custom_field_value
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-tags.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/add-tags.php+29
    Undefined index: btnVoslAddTag
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php+15
    Undefined variable: view_link
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php+41
    Undefined index: btnVoslAddListingClose
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Notice in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php+42
    Undefined index: btnVoslAddlisting

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/information.php
    • > /wp-content/plugins/vo-locator-the-wp-store-locator/freemius/templates/ajax-loader.php
  • 75× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening '../vosl-define.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php on line 4
    • > PHP Notice
      Undefined variable: vosl_search_box_width in wp-content/plugins/vo-locator-the-wp-store-locator/templates/user_interface_settings.php on line 21
    • > PHP Notice
      Undefined variable: tld in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/vo-locator-the-wp-store-locator/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: vosl_listing_column_height in wp-content/plugins/vo-locator-the-wp-store-locator/templates/user_interface_settings.php on line 18
    • > PHP Notice
      Undefined variable: vosl_map_size_width in wp-content/plugins/vo-locator-the-wp-store-locator/templates/user_interface_settings.php on line 9
    • > PHP Notice
      Undefined variable: vosl_custom_map_popup_bgcolor in wp-content/plugins/vo-locator-the-wp-store-locator/templates/user_interface_settings.php on line 102
    • > PHP Warning
      Use of undefined constant VOSL_INCLUDES_PATH - assumed 'VOSL_INCLUDES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-locations.php on line 7
    • > PHP Notice
      Undefined index: id in wp-content/plugins/vo-locator-the-wp-store-locator/vosl-admin/pages/edit-tags.php on line 5
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/vo-locator-the-wp-store-locator/templates/user_interface_settings.php on line 117

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)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vo-locator-the-wp-store-locator/vosl-admin/pages/add-locations.php
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places&key= 77:296 "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"

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #7, #8 in vo-locator-the-wp-store-locator/assets to your readme.txt
You can look at the official readme.txt

vo-locator-the-wp-store-locator/vo-locator.php 85% from 13 tests

The main PHP script in "VO Store Locator - WP Store Locator Plugin" version 3.3.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("vo-locator-the-wp-store-locator.php" instead of "vo-locator.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 190 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin115,239 lines of code in 403 files:
LanguageFilesBlank linesComment linesLines of code
PHP1277,30415,12630,394
JavaScript973,8343,98530,211
JSON60015,910
PO File176,7556,66714,512
CSS8252941013,071
Sass424331114,283
SVG1002,671
LESS1434441,758
Markdown580401,555
CoffeeScript3404425
HTML5521411
YAML32033
Bourne Shell1015

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity73.92
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,104
▷ Static methods18216.49%
▷ Public methods78370.92%
▷ Protected methods151.36%
▷ Private methods30627.72%
Functions107
▷ Named functions10699.07%
▷ Anonymous functions10.93%
Constants180
▷ Global constants16088.89%
▷ Class constants2011.11%
▷ Public constants20100.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
24 PNG files occupy 0.86MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_both.png0.20KB0.29KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/location-description-bg.png0.36KB0.31KB▼ 11.78%
assets/screenshot-3.png188.54KB79.51KB▼ 57.83%
images/icons/fax.png0.24KB0.18KB▼ 25.91%