89% addy-autocomplete-woocommerce

Code Review | Addy's NZ Address Autocomplete for WooCommerce

WordPress plugin Addy's NZ Address Autocomplete for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: addy-autocomplete...
  • Plugin version: 2.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.0
  • WordPress version: 6.3.1
  • First release: Feb 15, 2018
  • Latest release: Oct 2, 2022
  • Number of updates: 39
  • Update frequency: every 43.3 days
  • Top authors: jaystrydom (53.85%)stenly311 (41.03%)joelrozen (10.26%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /3,166 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.17ms] Passed 4 tests

This is a short check of server-side resources used by Addy's NZ Address Autocomplete for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.61 ▲1.98
Dashboard /wp-admin3.32 ▲0.0249.75 ▼1.81
Posts /wp-admin/edit.php3.38 ▲0.0248.33 ▼2.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.67 ▼22.66
Media Library /wp-admin/upload.php3.25 ▲0.0235.13 ▼5.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Addy's NZ Address Autocomplete for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.081.91 ▲0.0346.70 ▲4.96
Dashboard /wp-admin2,195 ▲185.59 ▼0.0385.21 ▼8.9240.90 ▼3.72
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0436.60 ▼5.1336.07 ▼1.30
Add New Post /wp-admin/post-new.php1,526 ▼023.43 ▼0.13692.60 ▲57.0058.07 ▲5.67
Media Library /wp-admin/upload.php1,400 ▼04.16 ▲0.0695.33 ▼20.2842.25 ▼7.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: The official readme.txt is a good inspiration

addy-autocomplete-woocommerce/addy-woocommerce.php 92% from 13 tests

This is the main PHP file of "Addy's NZ Address Autocomplete for WooCommerce" version 2.1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("addy-autocomplete-woocommerce.php" instead of "addy-woocommerce.php")

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
Success! There were no dangerous files found in this plugin229 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2206113
PHP118889
Markdown125026
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin