10% gwebpro-store-locator

Code Review | Gwebpro Store Locator

WordPress plugin Gwebpro Store Locator scored10%from 54 tests.

About plugin

  • Plugin page: gwebpro-store-loc...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2013
  • Latest release: Jan 12, 2016
  • Number of updates: 55
  • Update frequency: every 29.2 days
  • Top authors: moonheart (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

80+ active /13,982 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; gwebproStoreLocator has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼54.18ms] Passed 4 tests

Analyzing server-side resources used by Gwebpro Store Locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.225.56 ▼36.87
Dashboard /wp-admin2.26 ▼1.046.20 ▼42.68
Posts /wp-admin/edit.php2.26 ▼1.0912.53 ▼39.74
Add New Post /wp-admin/post-new.php2.26 ▼3.638.68 ▼97.41
Media Library /wp-admin/upload.php2.26 ▼0.976.10 ▼31.91
Store Locator /wp-admin/edit.php?post_type=store2.265.84
Store Category /wp-admin/edit-tags.php?taxonomy=store_category&post_type=store2.266.67
Add Store /wp-admin/post-new.php?post_type=store2.265.79

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Gwebpro Store Locator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲21914.56 ▲0.1628.46 ▲26.7637.34 ▼8.46
Dashboard /wp-admin2,273 ▲674.93 ▼0.94106.85 ▲3.7961.95 ▲18.01
Posts /wp-admin/edit.php2,152 ▲522.02 ▼0.0441.59 ▲1.2536.61 ▼2.50
Add New Post /wp-admin/post-new.php1,722 ▲19122.77 ▼0.40665.30 ▲60.5853.93 ▲4.72
Media Library /wp-admin/upload.php1,443 ▲434.23 ▲0.0295.79 ▼6.9878.77 ▲33.48
Store Locator /wp-admin/edit.php?post_type=store1,1301.9634.2130.39
Store Category /wp-admin/edit-tags.php?taxonomy=store_category&post_type=store1,3232.1526.7532.17
Add Store /wp-admin/post-new.php?post_type=store2,5049.37228.8362.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; gwebproStoreLocator has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Deprecated in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; gwebproStoreLocator has a deprecated constructor
    • > GET request to /wp-admin/edit-tags.php?taxonomy=store_category&post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+232
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: list-address1
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: list-city
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: list-postcode
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: addi-website
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: addi-mobile
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: addi-phone
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: addi-fax
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: addi-email
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: list-lat
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Notice in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php+118
    Undefined index: list-long

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_queryvar() on null in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator-frontend.php:2
    • > PHP Notice
      Undefined variable: store in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator-frontend.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gwebpro-store-locator/gwebpro-store-locator.php:575

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Javascript (warning) in unknown
    /wp-content/plugins/gwebpro-store-locator/js/storeAdmin.js?ver=6.3.1 47 A parser-blocking, cross site (i.e. different eTLD+1) script, http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/post-new.php?post_type=store
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false 235: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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 41 tag instead of maximum 10
The official readme.txt might help

gwebpro-store-locator/gwebpro-store-locator.php 92% from 13 tests

The entry point to "Gwebpro Store Locator" version 1.0.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 222 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,305 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP26736717
JavaScript2172227487
CSS2113101

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.80MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/top_arrow.png1.06KB0.18KB▼ 82.66%
images/me_map - Copy.png1.72KB0.92KB▼ 46.19%
images/close_button.png2.81KB1.93KB▼ 31.38%
assets/screenshot 1 - Gwebpro Storlocator Map search.png401.42KB161.27KB▼ 59.82%
assets/screenshot 3 - Gwebpro Storlocator store lists.png55.99KB27.52KB▼ 50.85%