84% woo-address-book

Code Review | WooCommerce Address Book

WordPress plugin WooCommerce Address Book scored84%from 54 tests.

About plugin

  • Plugin page: woo-address-book
  • Plugin version: 2.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2017
  • Latest release: Aug 12, 2023
  • Number of updates: 132
  • Update frequency: every 17.5 days
  • Top authors: hallme (79.55%)crosspeak (21.21%)

Code review

54 tests

User reviews

22 reviews

Install metrics

4,000+ active /62,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by WooCommerce Address Book
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.37 ▼5.34
Dashboard /wp-admin3.31 ▲0.0048.70 ▼0.70
Posts /wp-admin/edit.php3.36 ▲0.0049.41 ▼8.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.31 ▼13.20
Media Library /wp-admin/upload.php3.23 ▲0.0039.25 ▲4.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Address Book
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.171.77 ▼0.0642.05 ▼0.93
Dashboard /wp-admin2,209 ▲215.90 ▲1.0398.73 ▼7.7737.43 ▼5.99
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0141.26 ▲0.5636.48 ▼0.85
Add New Post /wp-admin/post-new.php1,519 ▼1423.40 ▼0.03642.13 ▼49.2250.54 ▼25.88
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0098.91 ▼17.3043.27 ▼5.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-address-book/includes/settings.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Manage your address book on the account page. Choose your primary billing address, shipping address, or add multiple alternative addresses.), #2 (Easily select your billing and shipping address on checkout.)
You can take inspiration from this readme.txt

woo-address-book/woocommerce-address-book.php 92% from 13 tests

"WooCommerce Address Book" version 2.6.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-address-book.php" instead of "woocommerce-address-book.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
Everything looks great! No dangerous files found in this plugin1,276 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP42664641,023
JavaScript25337212
CSS29041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity180.00
▷ Minimum class complexity180.00
▷ Maximum class complexity180.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods4295.45%
▷ Protected methods00.00%
▷ Private methods24.55%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
PNG images were not found in this plugin