83% virtual-product-checkout-fields-manager

Code Review | Virtual product checkout field manager for WooCommerce

WordPress plugin Virtual product checkout field manager for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: virtual-product-c...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 7
  • Update frequency: every 75.0 days
  • Top authors: mehedi_csit (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Virtual product checkout field manager for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.92 ▼10.10
Dashboard /wp-admin3.32 ▼0.0344.80 ▼19.38
Posts /wp-admin/edit.php3.37 ▲0.0144.52 ▼4.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.19 ▼10.91
Media Library /wp-admin/upload.php3.24 ▲0.0131.93 ▼0.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Virtual product checkout field manager for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.27 ▼0.301.63 ▼0.1736.36 ▼6.43
Dashboard /wp-admin2,204 ▲275.64 ▲0.0390.32 ▼4.2938.70 ▼7.56
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0239.33 ▲0.0636.04 ▼3.15
Add New Post /wp-admin/post-new.php1,535 ▲923.26 ▲0.10616.41 ▼79.0450.08 ▼1.44
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.0293.56 ▼7.9342.71 ▲1.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/virtual-product-checkout-fields-manager/includes/admin/templates/digital-product-checkout-fields.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: digital product checkout fields, woocommerce digital product, virtual product, woocommerce checkout, remove billing fields...

virtual-product-checkout-fields-manager/checkout-fields-manager.php 85% from 13 tests

The main PHP script in "Virtual product checkout field manager for WooCommerce" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("virtual-product-checkout-fields-manager.php" instead of "checkout-fields-manager.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
Success! There were no dangerous files found in this plugin504 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10106183287
CSS2220148
JavaScript22435
JSON10022
XML17312

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity2.40
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1058.82%
▷ Protected methods00.00%
▷ Private methods741.18%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/test.png0.00KB0.00KB0.00%