94% addressian-for-woocommerce

Code Review | Addressian Checkout Address Postcode Autocomplete for Woocommerce

WordPress plugin Addressian Checkout Address Postcode Autocomplete for Woocommerce scored 94% from 54 tests.

About plugin

  • Plugin page: addressian-for-wo...
  • Plugin version: 1.4
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-5.7
  • WordPress version: 5.8.1
  • First release: Dec 5, 2019
  • Latest release: May 17, 2021
  • Number of updates: 17
  • Update frequency: every 31.2 days
  • Top authors: addressian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,264 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼147.65ms] Passed 4 tests

An overview of server-side resources used by Addressian Checkout Address Postcode Autocomplete for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▲0.0923.51 ▼3.11
Dashboard /wp-admin3.12 ▲0.0747.44 ▼3.13
Posts /wp-admin/edit.php3.20 ▲0.0937.04 ▼2.87
Add New Post /wp-admin/post-new.php5.05 ▼0.3878.84 ▼581.50
Media Library /wp-admin/upload.php3.07 ▲0.0634.54 ▲3.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Addressian Checkout Address Postcode Autocomplete for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,308 ▼28816.07 ▲0.030.44 ▼10.479.44 ▼38.19
Dashboard /wp-admin3,015 ▲786.80 ▲0.60152.34 ▲1.83125.26 ▲19.29
Posts /wp-admin/edit.php2,811 ▲722.78 ▲0.0771.24 ▲5.28104.00 ▲16.94
Add New Post /wp-admin/post-new.php1,655 ▼2,03821.54 ▲6.45302.81 ▼151.14115.63 ▲9.87
Media Library /wp-admin/upload.php1,802 ▼55.15 ▲0.13139.28 ▼36.64140.69 ▲26.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addressian-for-woocommerce/include/func-postcode.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addressian-for-woocommerce/include/func-postcode-shipping.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addressian-for-woocommerce/include/admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addressian-for-woocommerce/include/func-address.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addressian-for-woocommerce/include/func-address-shipping.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addressian-for-woocommerce/include/admin.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce address autocomplete, addressian address autocomplete, address address validation, addressian address autofill, checkout address autocomplete

addressian-for-woocommerce/addressian-for-woocommerce.php 92% from 13 tests

The main file in "Addressian Checkout Address Postcode Autocomplete for Woocommerce" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.0" instead of "2.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,575 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP81491671,056
JavaScript57245387
CSS4127132

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo.png37.71KB20.56KB▼ 45.48%
admin/images/favicon-gray-16x16.png0.55KB0.54KB▼ 1.42%