84% conditional-woo-checkout-field

Code Review | Conditional WooCommerce Checkout Field

WordPress plugin Conditional WooCommerce Checkout Field scored 84% from 54 tests.

About plugin

  • Plugin page: conditional-woo-c...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Mar 30, 2023
  • Number of updates: 66
  • Update frequency: every 48.8 days
  • Top authors: scott.deluzio (98.48%)ampmode (3.03%)

Code review

54 tests

User reviews

15 reviews

Install metrics

800+ active / 33,375 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.16MB] [CPU: ▼8.01ms] Passed 4 tests

A check of server-side resources used by Conditional WooCommerce Checkout Field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.04 ▼0.71
Dashboard /wp-admin3.33 ▲0.0345.63 ▼5.02
Posts /wp-admin/edit.php3.38 ▲0.0346.32 ▲1.81
Add New Post /wp-admin/post-new.php5.16 ▼0.7266.71 ▼23.20
Media Library /wp-admin/upload.php3.26 ▲0.0333.95 ▼3.10
Conditional Field /wp-admin/admin.php?page=wc-conditional-field3.3237.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Conditional WooCommerce Checkout Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.54 ▼0.781.62 ▼0.1938.20 ▼13.29
Dashboard /wp-admin2,230 ▲424.90 ▼0.02109.40 ▼8.0845.24 ▲1.73
Posts /wp-admin/edit.php2,116 ▲272.02 ▼0.0240.66 ▲5.8338.66 ▲3.26
Add New Post /wp-admin/post-new.php45 ▼1,4760.44 ▼22.730.08 ▼678.469.16 ▼47.53
Media Library /wp-admin/upload.php1,412 ▲304.22 ▼0.01134.30 ▲35.8049.15 ▲2.82
Conditional Field /wp-admin/admin.php?page=wc-conditional-field1,0942.2031.4736.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/conditional-woo-checkout-field/conditional-woo-checkout-field.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: input, custom, plugin, input field, checkout...

conditional-woo-checkout-field/conditional-woo-checkout-field.php 92% from 13 tests

The primary PHP file in "Conditional WooCommerce Checkout Field" version 1.2.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.1.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin488 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP105969426
CSS10040
JavaScript34022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected