84% woocommerce-duplicate-billing-address

Code Review | WooCommerce Duplicate Billing Address

WordPress plugin WooCommerce Duplicate Billing Address scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-dupli...
  • Plugin version: 1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.75
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Jun 8, 2017
  • Number of updates: 27
  • Update frequency: every 35.6 days
  • Top authors: tabboy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /5,012 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.01MB] [CPU: ▼8.44ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Duplicate Billing Address
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.99 ▼7.27
Dashboard /wp-admin3.31 ▼0.0444.62 ▼13.50
Posts /wp-admin/edit.php3.36 ▲0.0049.23 ▲5.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.71 ▼9.29
Media Library /wp-admin/upload.php3.23 ▲0.0033.70 ▼3.70

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

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

Browser metrics Passed 4 tests

WooCommerce Duplicate Billing Address: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.251.60 ▼0.2339.42 ▼4.66
Dashboard /wp-admin2,206 ▲175.82 ▲0.93112.53 ▼6.4342.60 ▼4.91
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0140.70 ▲3.9336.57 ▼1.02
Add New Post /wp-admin/post-new.php1,542 ▲2818.27 ▲0.81606.42 ▼83.8151.46 ▲0.49
Media Library /wp-admin/upload.php1,382 ▼64.17 ▼0.08102.20 ▼1.6942.95 ▼4.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woocommerce-duplicate-billing-address/admin/partials/woocommerce-duplicate-billing-address-admin-display.php
    • > /wp-content/plugins/woocommerce-duplicate-billing-address/public/partials/woocommerce-duplicate-billing-address-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

woocommerce-duplicate-billing-address/woocommerce-duplicate-billing-address.php Passed 13 tests

The entry point to "WooCommerce Duplicate Billing Address" version 1.16 is a PHP file that has certain tags in its header comment area
116 characters long description:
Adds a checkbox in the edit user profile dashboard page to duplicate the billing to shipping address in WooCommerce.

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 plugin532 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13197759480
JavaScript2133052
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.38
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods48.51%
▷ Public methods3574.47%
▷ Protected methods00.00%
▷ Private methods1225.53%
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
There were not PNG files found in your plugin