10% fs-store-locator

Code Review | Store Locator

WordPress plugin Store Locator scored10%from 54 tests.

About plugin

  • Plugin page: fs-store-locator
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Feb 22, 2021
  • Latest release: Apr 12, 2021
  • Number of updates: 6
  • Update frequency: every 8.7 days
  • Top authors: fudugo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /501 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/fs-store-locator/fssl-store-locator.php+15
    include(wp-content/plugins/fs-store-locator\includes\fssl-admin-function.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.93MB] [CPU: ▼46.50ms] Passed 4 tests

Server-side resources used by Store Locator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.63 ▼32.33
Dashboard /wp-admin2.08 ▼1.235.69 ▼37.54
Posts /wp-admin/edit.php2.08 ▼1.286.96 ▼36.83
Add New Post /wp-admin/post-new.php2.08 ▼3.816.64 ▼79.30
Media Library /wp-admin/upload.php2.08 ▼1.154.94 ▼31.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Store Locator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,765 ▲3014.45 ▲0.151.74 ▲0.0550.95 ▲14.42
Dashboard /wp-admin2,193 ▲45.77 ▲0.8696.57 ▼25.3739.24 ▼7.74
Posts /wp-admin/edit.php1,252 ▼8371.95 ▼0.0736.64 ▲0.1833.03 ▲1.77
Add New Post /wp-admin/post-new.php1,540 ▲2623.27 ▲5.72630.77 ▼29.5459.98 ▲6.89
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0495.43 ▼9.2242.83 ▲0.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/fs-store-locator/fssl-store-locator.php+15
    include(wp-content/plugins/fs-store-locator\includes\fssl-admin-function.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/fs-store-locator/fssl-store-locator.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fssl_country() in wp-content/plugins/fs-store-locator/includes/template/fssl-map.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/fs-store-locator/includes/template/admin/fssl-store-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/fs-store-locator/includes/template/admin/fssl-stores-setting.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: store locator, locate your store on map

fs-store-locator/fssl-store-locator.php 77% from 13 tests

The primary PHP file in "Store Locator" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 256 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fs-store-locator.php" instead of "fssl-store-locator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,433 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS4104641,009
JavaScript5207110974
PHP810246449
JSON1001

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.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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/search-icon.png3.75KB1.56KB▼ 58.42%
assets/img/Screenshot_1.png145.29KB54.92KB▼ 62.20%
assets/img/Screenshot_3.png32.53KB14.00KB▼ 56.97%
assets/img/Screenshot_4.png15.74KB7.80KB▼ 50.43%
assets/img/search-icon-mobile.png3.87KB1.20KB▼ 68.88%