89% gazchaps-woocommerce-getaddress-io

Code Review | GazChap's WooCommerce getAddress.io Postcode Lookup

WordPress plugin GazChap's WooCommerce getAddress.io Postcode Lookup scored89%from 54 tests.

About plugin

  • Plugin page: gazchaps-woocomme...
  • Plugin version: 3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2019
  • Latest release: Oct 26, 2023
  • Number of updates: 35
  • Update frequency: every 48.7 days
  • Top authors: gazchap (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active /4,746 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼12.11ms] Passed 4 tests

Analyzing server-side resources used by GazChap's WooCommerce getAddress.io Postcode Lookup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.72 ▲0.34
Dashboard /wp-admin3.31 ▼0.0444.77 ▼15.99
Posts /wp-admin/edit.php3.36 ▲0.0041.38 ▼7.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.64 ▼23.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.41 ▼2.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GazChap's WooCommerce getAddress.io Postcode Lookup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.17 ▼0.091.79 ▼0.0939.53 ▲0.55
Dashboard /wp-admin2,195 ▲185.50 ▼0.1779.47 ▼5.2637.13 ▼5.45
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0535.00 ▼4.3931.83 ▼2.20
Add New Post /wp-admin/post-new.php1,526 ▼223.54 ▲0.59687.55 ▲50.2353.20 ▼1.46
Media Library /wp-admin/upload.php1,400 ▼34.10 ▼0.1099.24 ▲1.1945.52 ▲0.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: ecommerce, address lookup, woocommerce, postcode lookup, wales...

gazchaps-woocommerce-getaddress-io/index.php 77% from 13 tests

This is the main PHP file of "GazChap's WooCommerce getAddress.io Postcode Lookup" version 3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8.0" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gazchaps-woocommerce-getaddress-io.php" instead of "index.php")
  • Domain Path: The domain path folder does not exist ("/lang")

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
No dangerous file extensions were detected693 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP813656691
JavaScript2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.62
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1735.42%
▷ Public methods4491.67%
▷ Protected methods00.00%
▷ Private methods48.33%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin