79% product-geolocation-for-woo

Code Review | Product Geolocation for WooCommerce - Set Your Store Products Location with Google Map

WordPress plugin Product Geolocation for WooCommerce - Set Your Store Products Location with Google Map scored79%from 54 tests.

About plugin

  • Plugin page: product-geolocati...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9.3
  • WordPress version: 6.3.1
  • First release: May 4, 2022
  • Latest release: May 5, 2022
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: alamgircsebd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼7.77ms] Passed 4 tests

An overview of server-side resources used by Product Geolocation for WooCommerce - Set Your Store Products Location with Google Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4241.46 ▲1.49
Dashboard /wp-admin3.80 ▲0.4648.71 ▼11.15
Posts /wp-admin/edit.php3.85 ▲0.5045.10 ▼5.24
Add New Post /wp-admin/post-new.php6.34 ▲0.4681.64 ▼16.19
Media Library /wp-admin/upload.php3.66 ▲0.4440.14 ▲5.77
Product Geolocation /wp-admin/admin.php?page=product-geolocation-for-woo3.6332.83
Help /wp-admin/admin.php?page=product-geolocation-for-woo-help3.6333.36

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 10 new options
New WordPress options
wp_wpg_admin_settings_general
wp_wpg_admin_settings_shop_page
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
product_geolocation_for_woo_version
wp_wpg_admin_settings_single_product
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Product Geolocation for WooCommerce - Set Your Store Products Location with Google Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.60 ▼0.791.67 ▼0.1446.26 ▲8.09
Dashboard /wp-admin2,248 ▲605.81 ▼0.07103.40 ▲0.1142.33 ▼1.88
Posts /wp-admin/edit.php2,130 ▲412.06 ▲0.0836.73 ▲1.5332.71 ▲1.41
Add New Post /wp-admin/post-new.php1,552 ▲3322.85 ▼0.43639.05 ▼15.7353.96 ▲2.19
Media Library /wp-admin/upload.php1,430 ▲484.32 ▲0.0998.33 ▲2.1940.77 ▼3.80
Product Geolocation /wp-admin/admin.php?page=product-geolocation-for-woo1,1061.9630.6935.72
Help /wp-admin/admin.php?page=product-geolocation-for-woo-help1,3779.42298.3072.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • wp_wpg_admin_settings_single_product
    • widget_recent-posts
    • product_geolocation_for_woo_version
    • wp_wpg_admin_settings_shop_page
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • wp_wpg_admin_settings_general

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/product-geolocation-for-woo/templates/html-geolocation-for-shop.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-geolocation-for-woo/templates/admin/product-panel-tab.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-geolocation-for-woo/templates/html-geolocation-for-single-product.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/product-geolocation-for-woo/templates/html-shop-product-geolocation-data.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/product-geolocation-for-woo/templates/admin/product-tabs-data.php:10
    • > PHP Notice
      Undefined variable: enable_search in wp-content/plugins/product-geolocation-for-woo/templates/html-geolocation-for-shop.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: geolocation, woocommerce, woocommerce-geolocation, wc-geolocation, product-geolocation

product-geolocation-for-woo/product-geolocation-for-woo.php Passed 13 tests

The main PHP script in "Product Geolocation for WooCommerce - Set Your Store Products Location with Google Map" version 1.0.0 is automatically included on every request by WordPress
110 characters long description:
Set your WooCommerce products location wise. Single product page locaton tabs, shop page search location wise.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,868 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP254221,2091,771
JavaScript5268499870
CSS207215
SVG1017
JSON1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity18.86
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods126
▷ Static methods1915.08%
▷ Public methods12296.83%
▷ Protected methods00.00%
▷ Private methods43.17%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants7
▷ Global constants7100.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
4 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpr-wpg-gmap-cluster-icon.png124.95KB51.42KB▼ 58.85%
assets/images/searchicon.png0.84KB0.46KB▼ 45.23%
assets/images/wpr-wpg-gmap-icon.png19.41KB7.84KB▼ 59.62%
assets/images/drop-down-arow.png1.08KB0.21KB▼ 80.43%