89% store-locator-widget

Code Review | Store Locator Widget

WordPress plugin Store Locator Widget scored89%from 54 tests.

About plugin

  • Plugin page: store-locator-widget
  • Plugin version: 20200131...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2017
  • Latest release: Oct 4, 2023
  • Number of updates: 17
  • Update frequency: every 126.2 days
  • Top authors: Store Locator Pro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /6,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.03ms] Passed 4 tests

A check of server-side resources used by Store Locator Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.12 ▼3.68
Dashboard /wp-admin3.35 ▲0.0456.40 ▼8.66
Posts /wp-admin/edit.php3.40 ▲0.0455.06 ▲1.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.76 ▼9.45
Media Library /wp-admin/upload.php3.27 ▲0.0439.19 ▲2.19

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_storelocatorwidget
New WordPress options
widget_theysaidso_widget
storelocatorwidget_db_version
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Store Locator Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.72 ▲0.442.20 ▲0.1441.30 ▼4.26
Dashboard /wp-admin2,213 ▲335.67 ▲0.1483.92 ▼8.5872.20 ▲26.00
Posts /wp-admin/edit.php2,121 ▲181.99 ▲0.0236.72 ▲1.1135.45 ▼1.75
Add New Post /wp-admin/post-new.php1,568 ▲3323.02 ▲4.81719.48 ▲80.9758.65 ▼13.56
Media Library /wp-admin/upload.php1,415 ▲154.25 ▲0.11111.45 ▲5.1170.98 ▲25.72

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • storelocatorwidget_db_version
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

"Store Locator Widget" version 20200131...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "20200131...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected12,950 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS2422,36412,759
PHP36237170
Markdown112021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png4.31KB1.28KB▼ 70.20%
images/logo.png25.59KB7.72KB▼ 69.85%