78% store-locator-software-for-website

Code Review | Store Locator Software for Website

WordPress plugin Store Locator Software for Website scored78%from 54 tests.

About plugin

  • Plugin page: store-locator-sof...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Dec 21, 2019
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: pinpointstorelocator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.21ms] Passed 4 tests

A check of server-side resources used by Store Locator Software for Website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.84 ▼3.73
Dashboard /wp-admin3.32 ▲0.0254.67 ▲4.03
Posts /wp-admin/edit.php3.38 ▲0.0150.39 ▲3.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.38 ▼9.81
Media Library /wp-admin/upload.php3.25 ▲0.0138.83 ▲1.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Store Locator Software for Website
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.36 ▼0.919.52 ▲7.4643.09 ▼4.29
Dashboard /wp-admin2,216 ▲395.57 ▼0.0084.72 ▼15.5739.18 ▼5.70
Posts /wp-admin/edit.php2,118 ▲151.99 ▲0.0334.33 ▼6.8036.53 ▼8.88
Add New Post /wp-admin/post-new.php1,541 ▲1323.66 ▲0.54686.91 ▼22.0152.05 ▼4.38
Media Library /wp-admin/upload.php1,421 ▲214.20 ▼0.0295.20 ▼10.4243.49 ▼3.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/store-locator-software-for-website/templates/frontpage/nopinpointkeyfound.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PINPOINT_PLUGIN_PATH - assumed 'PINPOINT_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/store-locator-software-for-website/library/pinpoint-actions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getPinPointLocatorData() in wp-content/plugins/store-locator-software-for-website/templates/pinpoint-storelists.php:6
    • > PHP Warning
      include_once(): Failed opening 'PINPOINT_PLUGIN_PATHlibrary/pinpoint-server.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/store-locator-software-for-website/library/pinpoint-actions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getPinPointLocatorData() in wp-content/plugins/store-locator-software-for-website/templates/pinpoint-editstore.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/store-locator-software-for-website/templates/frontpage/showpinpointfrontend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/store-locator-software-for-website/library/pinpoint-adminpage.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/store-locator-software-for-website/library/frontpage/performaction.php:2
    • > PHP Warning
      Use of undefined constant PINPOINT_PLUGIN_PATH - assumed 'PINPOINT_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/store-locator-software-for-website/library/pinpoint-adminpage.php on line 4
    • > PHP Notice
      Undefined variable: pinPointAccessKey in wp-content/plugins/store-locator-software-for-website/templates/pinpoint-addnewstore.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getPinPointLocatorData() in wp-content/plugins/store-locator-software-for-website/templates/frontpage/showsearchform.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: google, store, software, multiple store locator, product...

store-locator-software-for-website/wp_pinpoint_store_locator_plugin.php 85% from 13 tests

This is the main PHP file of "Store Locator Software for Website" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("store-locator-software-for-website.php" instead of "wp_pinpoint_store_locator_plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 321 characters long)

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 detected1,284 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1378151,127
CSS231103
JavaScript13054

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Settings.png13.59KB7.64KB▼ 43.79%
assets/Store Listing.png59.06KB32.86KB▼ 44.36%
assets/Add New Store.png26.39KB13.66KB▼ 48.25%
assets/Show On Frontend.png10.33KB5.80KB▼ 43.84%