84% storelocator

Code Review | Store Locator for WordPress📍

WordPress plugin Store Locator for WordPress📍 scored84%from 54 tests.

About plugin

  • Plugin page: storelocator
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 14, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 19
  • Update frequency: every 34.2 days
  • Top authors: microcompany (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /5,281 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.10MB] [CPU: ▼2.97ms] Passed 4 tests

Analyzing server-side resources used by Store Locator for WordPress📍
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.46 ▲3.38
Dashboard /wp-admin3.43 ▲0.1348.42 ▼1.55
Posts /wp-admin/edit.php3.47 ▲0.1144.06 ▼0.92
Add New Post /wp-admin/post-new.php6.02 ▲0.1279.29 ▼8.34
Media Library /wp-admin/upload.php3.36 ▲0.1235.61 ▼1.07

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Store Locator for WordPress📍
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,055 ▲30914.44 ▼0.121.75 ▲0.2643.58 ▲6.46
Dashboard /wp-admin2,461 ▲2865.57 ▼0.1684.55 ▼44.7782.52 ▲42.78
Posts /wp-admin/edit.php2,366 ▲2662.15 ▲0.1837.42 ▼0.0139.42 ▲4.69
Add New Post /wp-admin/post-new.php1,756 ▲23024.05 ▲0.97700.58 ▼7.0893.81 ▲39.47
Media Library /wp-admin/upload.php1,669 ▲2694.21 ▲0.09101.79 ▼1.6182.48 ▲37.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant STLR_DIR_URL - assumed 'STLR_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/storelocator/settings.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/storelocator/settings.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: store locator, business locations, maps, store finder, map markers...

storelocator/storelocator.php 92% from 13 tests

The entry point to "Store Locator for WordPress📍" version 1.1.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected738 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP317264625
CSS110113

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.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
storelocator-logo.png18.79KB10.42KB▼ 44.56%