84% make-checkout-required-fields-optional-or-optional-fields-required

Code Review | Make Checkout required fields optional or Optional fields required for woocommerce

WordPress plugin Make Checkout required fields optional or Optional fields required for woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: make-checkout-req...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 13, 2022
  • Latest release: Oct 15, 2022
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: rounakkumar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.92ms] Passed 4 tests

An overview of server-side resources used by Make Checkout required fields optional or Optional fields required for woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.07 ▲1.44
Dashboard /wp-admin3.35 ▲0.0546.36 ▼2.82
Posts /wp-admin/edit.php3.40 ▲0.0547.55 ▼4.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.58 ▼3.92
Media Library /wp-admin/upload.php3.27 ▲0.0535.97 ▼0.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Make Checkout required fields optional or Optional fields required for woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.63 ▼0.371.85 ▼0.2443.61 ▲0.75
Dashboard /wp-admin2,222 ▲314.85 ▼1.05109.03 ▲6.1439.48 ▼4.20
Posts /wp-admin/edit.php2,105 ▲192.00 ▲0.0340.29 ▲1.0435.33 ▼0.01
Add New Post /wp-admin/post-new.php1,547 ▲1422.96 ▼0.27646.91 ▲30.2649.64 ▼1.13
Media Library /wp-admin/upload.php1,404 ▲134.25 ▼0.1496.35 ▼3.0540.00 ▼3.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/make-checkout-required-fields-optional-or-optional-fields-required/make-checkout-fields-optional.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: woocommerce checkout field required, woocommerce, woocommerce checkout, woocommerce checkout field optional, make checkout fields optional in woocommerce

make-checkout-required-fields-optional-or-optional-fields-required/make-checkout-fields-optional.php 85% from 13 tests

The entry point to "Make Checkout required fields optional or Optional fields required for woocommerce" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 82 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("make-checkout-required-fields-optional-or-optional-fields-required.php" instead of "make-checkout-fields-optional.php")

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
No dangerous file extensions were detected328 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1548328

PHP code Passed 2 tests

A brief analysis 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.67
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%
Functions5
▷ Named functions5100.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 are no PNG files in this plugin