67% custom-store-locator

Code Review | Custom WP Store Locator

WordPress plugin Custom WP Store Locator scored67%from 54 tests.

About plugin

  • Plugin page: custom-store-locator
  • Plugin version: 1.4.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2020
  • Latest release: Sep 25, 2023
  • Number of updates: 38
  • Update frequency: every 28.5 days
  • Top authors: umangmetatagg (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /2,999 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.50ms] Passed 4 tests

This is a short check of server-side resources used by Custom WP Store Locator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.75 ▼6.67
Dashboard /wp-admin3.53 ▲0.2256.79 ▲7.82
Posts /wp-admin/edit.php3.64 ▲0.2848.95 ▲2.12
Add New Post /wp-admin/post-new.php6.13 ▲0.2484.59 ▼8.50
Media Library /wp-admin/upload.php3.45 ▲0.2241.20 ▲3.05
Add New /wp-admin/post-new.php?post_type=csl_locations3.5555.68
Locations /wp-admin/edit.php?post_type=csl_locations3.4940.22
Settings /wp-admin/admin.php?page=store_plugin_settings3.6247.15
Location Categories /wp-admin/edit-tags.php?taxonomy=csl_locations_categories&post_type=csl_locations3.4441.54
About /wp-admin/admin.php?page=store_plugin3.4538.86

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 16 new options
New WordPress options
csl_map_api_key
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
csl_fullwidth_include_loc
csl_autocompletesearchbox
csl_location_default_sorting
db_upgraded
csl_map_default_radius
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom WP Store Locator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲24815.28 ▲1.2530.65 ▲28.7141.84 ▼11.76
Dashboard /wp-admin2,268 ▲805.99 ▲0.11141.71 ▲19.0855.79 ▲14.61
Posts /wp-admin/edit.php2,165 ▲732.66 ▲0.6042.57 ▼7.4437.69 ▲3.60
Add New Post /wp-admin/post-new.php1,730 ▲20223.21 ▲0.11648.58 ▼22.9838.74 ▼18.60
Media Library /wp-admin/upload.php1,461 ▲735.29 ▲1.10111.78 ▼0.3243.87 ▼9.36
Add New /wp-admin/post-new.php?post_type=csl_locations2,6259.59276.39191.30
Locations /wp-admin/edit.php?post_type=csl_locations1,1542.8058.0037.73
Settings /wp-admin/admin.php?page=store_plugin_settings2,3163.6574.8542.10
Location Categories /wp-admin/edit-tags.php?taxonomy=csl_locations_categories&post_type=csl_locations1,3382.8860.8337.22
About /wp-admin/admin.php?page=store_plugin1,0443.6772.6036.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 16 options in the database
    • csl_include_cat
    • csl_custom_map_marker
    • widget_theysaidso_widget
    • csl_fullwidth_include_loc
    • widget_recent-posts
    • csl_country_restriction
    • csl_map_default_radius
    • csl_location_default_sorting
    • csl_map_api_key
    • csl_map_type
    • ...

Smoke tests 0% 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
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store_plugin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store_plugin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store_plugin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store_plugin
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-store-locator/custom-store-locator.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/custom-store-locator/inc/Csl-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-store-locator/inc/layout/default-right-map.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/custom-store-locator/templates/adminsettings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-store-locator/inc/layout/full-width-map.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-store-locator/templates/admin.php:7
    • > PHP Notice
      Undefined variable: csl_autocompletesearchbox in wp-content/plugins/custom-store-locator/inc/layout/default-right-map.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=store_plugin
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key&libraries=geometry%2Cplaces&ver=6.3.1 243: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"
    • > GET request to /wp-admin/post-new.php?post_type=csl_locations
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key&libraries=geometry%2Cplaces&ver=6.3.1 161:248 "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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: store locator, store list, wordpress store locator, wp store, store map...

custom-store-locator/custom-store-locator.php Passed 13 tests

The main file in "Custom WP Store Locator" v. 1.4.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
This is store locator plugin which provide search stores and other functionality.

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 plugin6,155 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PO File128518912,224
PHP181812641,637
JavaScript45436091,452
CSS43114817
JSON20018
SVG1017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods512.50%
▷ Public methods3997.50%
▷ Protected methods00.00%
▷ Private methods12.50%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pin.png2.65KB1.33KB▼ 49.69%
assets/images/direction-icon.png7.09KB3.49KB▼ 50.85%
assets/images/current-location.png4.44KB2.97KB▼ 33.04%