87% storerocket-store-locator

Code Review | StoreRocket Store Locator

WordPress plugin StoreRocket Store Locator scored 87% from 54 tests.

About plugin

  • Plugin page: storerocket-store...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 5.8.1
  • First release: Jul 8, 2018
  • Latest release: Nov 11, 2019
  • Number of updates: 9
  • Update frequency: every 54.6 days
  • Top authors: storerocket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 528 total downloads

Benchmarks

Plugin footprint Passed 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.06MB] [CPU: ▼173.97ms] Passed 4 tests

Server-side resources used by StoreRocket Store Locator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0645.92 ▲4.64
Dashboard /wp-admin3.13 ▲0.0739.27 ▼13.60
Posts /wp-admin/edit.php3.24 ▲0.1354.40 ▲1.69
Add New Post /wp-admin/post-new.php5.49 ▲0.05102.69 ▼681.95
Media Library /wp-admin/upload.php3.07 ▲0.0737.81 ▼2.02

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

StoreRocket Store Locator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,731 ▲13515.80 ▲0.358.91 ▼5.9050.65 ▼1.82
Dashboard /wp-admin3,012 ▲785.92 ▼0.03146.81 ▼6.15140.38 ▲20.92
Posts /wp-admin/edit.php2,809 ▲702.75 ▲0.0379.48 ▲10.0890.34 ▼7.96
Add New Post /wp-admin/post-new.php1,720 ▲3718.06 ▲1.81515.16 ▲102.37117.98 ▼11.36
Media Library /wp-admin/upload.php1,875 ▲685.01 ▼0.02152.50 ▼17.51143.49 ▲15.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/storerocket-store-locator/trunk/includes/templates/public/embed-code.php
    • > /wp-content/plugins/storerocket-store-locator/includes/templates/public/embed-code.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_STOREROCKET_DIR_URL - assumed 'WP_STOREROCKET_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/storerocket-store-locator/trunk/includes/templates/admin/settings.php on line 25
    • > PHP Warning
      Use of undefined constant WP_STOREROCKET_DIR_URL - assumed 'WP_STOREROCKET_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/storerocket-store-locator/includes/templates/admin/settings.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPStoreRocket\\settings_fields() in wp-content/plugins/storerocket-store-locator/trunk/includes/templates/admin/settings.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPStoreRocket\\settings_fields() in wp-content/plugins/storerocket-store-locator/includes/templates/admin/settings.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: Please take inspiration from this readme.txt

storerocket-store-locator/wp-storerocket.php 85% from 13 tests

The main file in "StoreRocket Store Locator" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("storerocket-store-locator.php" instead of "wp-storerocket.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected318 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP987152288
CSS12018
JavaScript10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.17
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods42
▷ Static methods819.05%
▷ Public methods4095.24%
▷ Protected methods00.00%
▷ Private methods24.76%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/assets/img/storerocket_icon.png0.76KB0.79KB0.00%
assets/img/storerocket_icon.png0.76KB0.79KB0.00%