56% pazzeys-store-locator

Code Review | Pazzey's Store Locator

WordPress plugin Pazzey's Store Locator scored56%from 54 tests.

About plugin

  • Plugin page: pazzeys-store-loc...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.4.1
  • WordPress version: 6.3.1
  • First release: Jun 5, 2012
  • Latest release: Sep 4, 2012
  • Number of updates: 11
  • Update frequency: every 8.3 days
  • Top authors: crispuno (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,574 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.66ms] Passed 4 tests

A check of server-side resources used by Pazzey's Store Locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.38 ▼34.60
Dashboard /wp-admin2.12 ▼1.197.83 ▼46.50
Posts /wp-admin/edit.php2.12 ▼1.246.79 ▼39.59
Add New Post /wp-admin/post-new.php2.12 ▼3.775.56 ▼101.95
Media Library /wp-admin/upload.php2.12 ▼1.115.92 ▼33.64
Stores /wp-admin/edit.php?post_type=pazzey_store2.125.91
Add New Store /wp-admin/post-new.php?post_type=pazzey_store2.127.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pazzey's Store Locator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9814.42 ▲0.072.14 ▼0.0244.08 ▼5.65
Dashboard /wp-admin2,230 ▲485.79 ▼0.06117.12 ▼1.4539.98 ▼0.38
Posts /wp-admin/edit.php2,116 ▲242.02 ▲0.0141.98 ▲3.0438.51 ▲6.50
Add New Post /wp-admin/post-new.php1,556 ▲3723.09 ▲0.02665.27 ▼10.4766.93 ▼4.16
Media Library /wp-admin/upload.php1,409 ▲214.22 ▲0.02112.31 ▼3.1343.76 ▼3.23
Stores /wp-admin/edit.php?post_type=pazzey_store1,0801.9939.6832.94
Add New Store /wp-admin/post-new.php?post_type=pazzey_store2,5399.78351.62188.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-includes/query.php+115
    Undefined index: wp_the_query
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > Notice in wp-includes/query.php+115
    Undefined index: wp_the_query
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > Warning in wp-content/plugins/pazzeys-store-locator/store_locator.php+38
    Use of undefined constant truew - assumed 'truew' (this will throw an Error in a future version of PHP)
  • 29 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 29 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 116 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 29 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > Notice in wp-content/plugins/pazzeys-store-locator/store_locator.php+163
    Undefined index: pazzey_noncename

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pazzeys-store-locator/files/xmlmap.php
    • > /wp-content/plugins/pazzeys-store-locator/files/storelocator.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pazzeys-store-locator/store_locator.php:15
    • > PHP Notice
      Undefined index: height in wp-content/plugins/pazzeys-store-locator/files/storelocator.php on line 10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=pazzey_store
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?sensor=false 210:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Store Locator custom post type input page.), #2 (Shortcode usage.), #3 (Embedded Store Locator.)
Please take inspiration from this readme.txt

pazzeys-store-locator/store_locator.php 85% from 13 tests

The principal PHP file in "Pazzey's Store Locator" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pazzeys-store-locator.php" instead of "store_locator.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 218 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
There were no executable files found in this plugin406 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34823400
CSS1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin