87% address-validation-address-auto-complete

Code Review | ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin

WordPress plugin ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin scored 87% from 54 tests.

About plugin

  • Plugin page: address-validatio...
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.9
  • WordPress version: 5.9.2
  • First release: May 12, 2021
  • Latest release: Feb 1, 2022
  • Number of updates: 16
  • Update frequency: every 16.6 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,690 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼296.38ms] Passed 4 tests

This is a short check of server-side resources used by ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0354.12 ▲4.06
Dashboard /wp-admin3.44 ▲0.0332.39 ▼8.33
Posts /wp-admin/edit.php3.67 ▲0.0236.45 ▼2.66
Add New Post /wp-admin/post-new.php6.91 ▼0.0791.66 ▼1,174.17
Media Library /wp-admin/upload.php3.32 ▲0.0224.79 ▼0.36

Server storage [IO: ▲0.51MB] [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: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲3115.77 ▼0.005.37 ▼0.262.05 ▼0.29
Dashboard /wp-admin2,898 ▲376.11 ▼0.02119.96 ▼23.20148.08 ▼21.44
Posts /wp-admin/edit.php2,701 ▲103.23 ▼0.0161.00 ▼2.83140.45 ▼4.64
Add New Post /wp-admin/post-new.php1,758 ▲9721.99 ▲5.22473.85 ▲2.27157.63 ▼2.56
Media Library /wp-admin/upload.php1,711 ▲195.54 ▲0.00141.80 ▼14.31191.75 ▼12.60

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
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/address-validation-address-auto-complete/includes/html-wf-device-address-validation.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/address-validation-address-auto-complete/includes/market.php:106
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/address-validation-address-auto-complete/includes/api/easypost-api.php:10
    • > PHP Notice
      Undefined variable: device in wp-content/plugins/address-validation-address-auto-complete/includes/html-wf-device-address-validation.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

address-validation-address-auto-complete/class-wf-address-autocomplete-validation.php 69% from 13 tests

The entry point to "ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin" version 1.5.7 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("address-validation-address-auto-complete.php" instead of "class-wf-address-autocomplete-validation.php")
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 85 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.6.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin11,476 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings