62% wp-multi-store-locator

Code Review | WP Multi Store Locator

WordPress plugin WP Multi Store Locator scored62%from 54 tests.

About plugin

  • Plugin page: wp-multi-store-lo...
  • Plugin version: 2.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2017
  • Latest release: Sep 11, 2023
  • Number of updates: 140
  • Update frequency: every 17.1 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /16,811 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by WP Multi Store Locator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7244.44 ▲7.99
Dashboard /wp-admin3.82 ▲0.4731.64 ▼30.54
Posts /wp-admin/edit.php3.89 ▲0.5434.47 ▼10.90
Add New Post /wp-admin/post-new.php6.15 ▲0.2668.71 ▼26.26
Media Library /wp-admin/upload.php3.84 ▲0.6132.07 ▼2.05
Maps /wp-admin/edit.php?post_type=maps3.8733.98
Sales Managers List /wp-admin/edit.php?post_type=sales_manager3.8731.34
Store Categories /wp-admin/edit-tags.php?taxonomy=store_locator_category&post_type=store_locator3.8232.74
Stores List /wp-admin/edit.php?post_type=store_locator3.8735.19
Settings /wp-admin/edit.php?post_type=store_locator&page=store_locator_settings_page4.2149.73
Store Tags /wp-admin/edit-tags.php?taxonomy=store_locator_tag&post_type=store_locator3.8232.52

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 77 new files
Database: 3 new tables, 10 new options
New tables
store_locator_transactions
store_locator_state
store_locator_country
New WordPress options
db_upgraded
placeholder_settings
store_locator_map
widget_theysaidso_widget
can_compress_scripts
widget_wp_store_locator_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
store_locator_grid

Browser metrics Passed 4 tests

An overview of browser requirements for WP Multi Store Locator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲23813.46 ▼1.279.34 ▲7.6444.74 ▲1.94
Dashboard /wp-admin2,293 ▲1125.54 ▼0.2182.82 ▼21.1439.66 ▼4.72
Posts /wp-admin/edit.php2,163 ▲632.09 ▲0.0639.94 ▲3.0234.08 ▼0.01
Add New Post /wp-admin/post-new.php1,581 ▲5523.53 ▲0.48602.49 ▼21.9371.97 ▲29.55
Media Library /wp-admin/upload.php1,460 ▲604.20 ▲0.01100.40 ▼6.1944.49 ▼1.13
Maps /wp-admin/edit.php?post_type=maps1,1472.1032.8136.95
Sales Managers List /wp-admin/edit.php?post_type=sales_manager1,1302.0537.7434.55
Store Categories /wp-admin/edit-tags.php?taxonomy=store_locator_category&post_type=store_locator1,6004.2182.0436.32
Stores List /wp-admin/edit.php?post_type=store_locator1,1382.0537.0833.11
Settings /wp-admin/edit.php?post_type=store_locator&page=store_locator_settings_page1,0843.7476.5327.09
Store Tags /wp-admin/edit-tags.php?taxonomy=store_locator_tag&post_type=store_locator1,4874.0558.0035.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • store_locator_country
    • store_locator_state
    • store_locator_transactions
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • store_locator_grid
    • placeholder_settings
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_wp_store_locator_widget
    • store_locator_map

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=store_locator_tag&post_type=store_locator
    • > Notice in wp-content/plugins/wp-multi-store-locator/inc/class-stores-backend.php+42
    Undefined index: page

SRP 50% 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-multi-store-locator/templates/single-store_locator.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-multi-store-locator/inc/class-multi-maps-backend.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-multi-store-locator/inc/store_locator_widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-multi-store-locator/inc/class-general-settings.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=store_locator_tag&post_type=store_locator
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 235: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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: store shortcode, store sales manager, store categories, store locator, search store

wp-multi-store-locator/store-locator.php 77% from 13 tests

The main file in "WP Multi Store Locator" v. 2.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-multi-store-locator.php" instead of "store-locator.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 335 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin23,196 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82,7121,75714,403
CSS72692204,737
PHP111431373,849
PO File1967207

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity85.62
▷ Minimum class complexity9.00
▷ Maximum class complexity163.00
Average method complexity10.71
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods69
▷ Static methods11.45%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.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
42 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/yellow.png0.94KB0.51KB▼ 45.57%
assets/img/aubergine.png1.16KB1.12KB▼ 3.21%
assets/img/purple.png0.96KB0.55KB▼ 42.10%
assets/img/silver.png1.17KB1.15KB▼ 1.34%
assets/img/orange.png0.92KB0.51KB▼ 44.64%