67% agile-store-locator

Code Review | Store Locator WordPress

WordPress plugin Store Locator WordPress scored67%from 54 tests.

About plugin

  • Plugin page: agile-store-locator
  • Plugin version: 1.4.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 301
  • Update frequency: every 8.8 days
  • Top authors: agilelogix (98.01%)zubairharoon (2.33%)

Code review

54 tests

User reviews

30 reviews

Install metrics

10,000+ active /141,658 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.91MB] [CPU: ▲3.25ms] Passed 4 tests

An overview of server-side resources used by Store Locator WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8742.33 ▼0.63
Dashboard /wp-admin4.23 ▲0.9357.82 ▲9.14
Posts /wp-admin/edit.php4.28 ▲0.9354.99 ▲7.64
Add New Post /wp-admin/post-new.php6.83 ▲0.9492.35 ▲1.51
Media Library /wp-admin/upload.php4.16 ▲0.9339.62 ▲4.47
ASL Settings /wp-admin/admin.php?page=asl-settings4.7749.62
Edit Store /wp-admin/admin.php?page=edit-agile-store4.0338.06
Import/Export (Pro) /wp-admin/admin.php?page=import-store-list4.1239.25
Agile Store Locator UI Customizer /wp-admin/options-writing.php?page=sl-ui-customizer3.9528.87
Markers (Pro) /wp-admin/admin.php?page=manage-store-markers4.0838.94
Categories /wp-admin/admin.php?page=manage-asl-categories4.0938.64
Manage Stores /wp-admin/admin.php?page=manage-agile-store4.3740.42
Logos (Pro) /wp-admin/admin.php?page=manage-store-logos4.0937.98
Dashboard /wp-admin/admin.php?page=agile-dashboard4.1740.46
Leads Manager /wp-admin/options-writing.php?page=sl-lead-manager3.9533.28

Server storage [IO: ▲9.56MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 427 new files
Database: 12 new tables, 7 new options
New tables
wp_asl_countries
wp_asl_storelogos
wp_asl_stores
wp_asl_categories
wp_asl_stores_view
wp_asl_settings
wp_asl_configs
wp_asl_brands
wp_asl_specials
wp_asl_stores_meta
...
New WordPress options
asl-migrate
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Store Locator WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲7814.36 ▲0.011.87 ▼0.0139.06 ▼5.34
Dashboard /wp-admin2,271 ▲945.59 ▼0.0696.37 ▼4.3745.08 ▼1.14
Posts /wp-admin/edit.php2,173 ▲731.95 ▼0.0139.24 ▲1.9735.84 ▲0.52
Add New Post /wp-admin/post-new.php6,421 ▲4,89427.49 ▲4.18833.63 ▲198.6537.24 ▼5.52
Media Library /wp-admin/upload.php1,476 ▲824.32 ▲0.1396.77 ▼3.9542.05 ▼0.38
ASL Settings /wp-admin/admin.php?page=asl-settings10,5796.54140.39161.44
Edit Store /wp-admin/admin.php?page=edit-agile-store7341.516.9119.07
Import/Export (Pro) /wp-admin/admin.php?page=import-store-list1,3862.4148.8250.05
Agile Store Locator UI Customizer /wp-admin/options-writing.php?page=sl-ui-customizer280.410.083.79
Markers (Pro) /wp-admin/admin.php?page=manage-store-markers1,3542.3245.1036.45
Categories /wp-admin/admin.php?page=manage-asl-categories2,7993.1578.9578.50
Manage Stores /wp-admin/admin.php?page=manage-agile-store3,9803.3791.9570.98
Logos (Pro) /wp-admin/admin.php?page=manage-store-logos1,3442.3242.2433.86
Dashboard /wp-admin/admin.php?page=agile-dashboard1,8363.23100.5794.90
Leads Manager /wp-admin/options-writing.php?page=sl-lead-manager280.410.073.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 12 tables
    • wp_asl_configs
    • wp_asl_stores_meta
    • wp_asl_settings
    • wp_asl_markers
    • wp_asl_categories
    • wp_asl_storelogos
    • wp_asl_brands
    • wp_asl_countries
    • wp_asl_specials
    • wp_asl_stores
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • asl-migrate

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 79× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: layout in wp-content/plugins/agile-store-locator/public/partials/template-frontend-0.php on line 51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/agile-store-locator/admin/partials/customize_map.php:5
    • > PHP Notice
      Trying to get property 'address' of non-object in wp-content/plugins/agile-store-locator/public/partials/asl-store-page.php on line 3
    • > PHP Notice
      Undefined variable: store_categories in wp-content/plugins/agile-store-locator/public/partials/asl-store-page.php on line 67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function asl_esc_lbl() in wp-content/plugins/agile-store-locator/public/partials/asl-store-page.php:85
    • > PHP Notice
      Undefined index: full_height in wp-content/plugins/agile-store-locator/public/partials/template-frontend-0.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/agile-store-locator/admin/partials/markers.php:27
    • > PHP Notice
      Undefined variable: all_configs in wp-content/plugins/agile-store-locator/public/partials/asl-store-page.php on line 14
    • > PHP Notice
      Trying to get property 'title' of non-object in wp-content/plugins/agile-store-locator/public/partials/asl-store-page.php on line 28
    • > PHP Notice
      Undefined variable: all_configs in wp-content/plugins/agile-store-locator/public/partials/template-frontend-0.php on line 8

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-writing.php?page=sl-ui-customizer
    • > Network (severe)
    wp-admin/options-writing.php?page=sl-ui-customizer - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/options-writing.php?page=sl-lead-manager
    • > Network (severe)
    wp-admin/options-writing.php?page=sl-lead-manager - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #6 is missing in agile-store-locator/assets to your readme.txt
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

agile-store-locator/agile-store-locator.php 85% from 13 tests

The primary PHP file in "Store Locator WordPress" version 1.4.18 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 254 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin60,905 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
PO File137,67010,93817,356
JSON20012,469
PHP814,5103,85512,468
JavaScript173,3737,51610,237
CSS154511717,770
SVG33753387
HTML700182
Markdown112036

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity24.52
▷ Minimum class complexity1.00
▷ Maximum class complexity243.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods380
▷ Static methods13234.74%
▷ Public methods33287.37%
▷ Protected methods195.00%
▷ Private methods297.63%
Functions14
▷ Named functions321.43%
▷ Anonymous functions1178.57%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
225 PNG files occupy 3.97MB with 1.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/map/Flat Map/53-flat-map.png61.48KB52.88KB▼ 14.00%
public/icon/route.png3.98KB1.27KB▼ 68.17%
admin/images/new/tmpl-0.png13.31KB13.37KB0.00%
public/icon/food.png3.49KB1.15KB▼ 67.17%
public/icon/default_13.png5.43KB1.60KB▼ 70.56%