90% custom-checkout-fields-for-woocommerce

Code Review | Custom Checkout Fields for WooCommerce

WordPress plugin Custom Checkout Fields for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: custom-checkout-f...
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: May 5, 2018
  • Latest release: Nov 24, 2023
  • Number of updates: 62
  • Update frequency: every 32.7 days
  • Top authors: algoritmika (90.32%)wpcodefactory (11.29%)

Code review

54 tests

User reviews

12 reviews

Install metrics

700+ active /19,842 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Custom Checkout Fields for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.19 ▲2.32
Dashboard /wp-admin3.33 ▲0.0246.43 ▼2.33
Posts /wp-admin/edit.php3.38 ▲0.0248.88 ▼0.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.85 ▼2.47
Media Library /wp-admin/upload.php3.25 ▲0.0235.54 ▲2.29

Server storage [IO: ▲0.21MB] [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: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Custom Checkout Fields for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.31 ▲0.181.62 ▼0.0839.49 ▲1.65
Dashboard /wp-admin2,192 ▲215.51 ▼0.1598.53 ▼1.7543.20 ▼4.16
Posts /wp-admin/edit.php2,097 ▼31.94 ▼0.0039.29 ▼1.2236.30 ▲4.76
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▼0.03664.26 ▲72.6265.19 ▲10.82
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.0496.79 ▼10.3947.17 ▲4.63

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Field options.) image not found
You can look at the official readme.txt

custom-checkout-fields-for-woocommerce/custom-checkout-fields-for-woocommerce.php Passed 13 tests

The principal PHP file in "Custom Checkout Fields for WooCommerce" v. 1.8.1 is loaded by WordPress automatically on each request
47 characters long description:
Add custom fields to WooCommerce checkout page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,951 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP141989072,325
PO File1153166399
JavaScript1315119226
CSS1281

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity27.27
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods69
▷ Static methods11.45%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 files were detected