84% flexible-checkout-fields

Code Review | Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager

WordPress plugin Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager scored84%from 54 tests.

About plugin

  • Plugin page: flexible-checkout...
  • Plugin version: 3.5.18
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Nov 9, 2023
  • Number of updates: 290
  • Update frequency: every 9.1 days
  • Top authors: wpdesk (74.83%)jablonowski (25.52%)

Code review

54 tests

User reviews

242 reviews

Install metrics

80,000+ active /1,945,658 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.54MB] [CPU: ▼0.94ms] Passed 4 tests

Analyzing server-side resources used by Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5438.61 ▼1.66
Dashboard /wp-admin3.85 ▲0.5447.61 ▼3.04
Posts /wp-admin/edit.php3.90 ▲0.5452.90 ▲6.75
Add New Post /wp-admin/post-new.php6.43 ▲0.5493.18 ▼1.59
Media Library /wp-admin/upload.php3.77 ▲0.5439.59 ▲2.54

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 577 new files
Database: no new tables, 7 new options
New WordPress options
plugin_activation_flexible-checkout-fields/flexible-checkout-fields.php
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.25 ▲0.001.64 ▼0.1039.97 ▼4.91
Dashboard /wp-admin2,195 ▲155.59 ▼0.0692.22 ▼0.9042.78 ▼2.84
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0139.51 ▼0.1634.88 ▼0.53
Add New Post /wp-admin/post-new.php1,534 ▲823.35 ▼0.16603.67 ▼42.4562.98 ▲10.34
Media Library /wp-admin/upload.php1,406 ▲94.28 ▲0.1094.79 ▼5.5541.52 ▼0.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • plugin_activation_flexible-checkout-fields/flexible-checkout-fields.php
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 301× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FCF\\Free\\Field\\Type\\TypeAbstract' not found in wp-content/plugins/flexible-checkout-fields/src/Field/Type/EmailType.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FCF\\Free\\Validator\\Error\\ErrorAbstract' not found in wp-content/plugins/flexible-checkout-fields/src/Validator/Error/InvalidRegexError.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FcfVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/flexible-checkout-fields/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FCF\\Free\\Settings\\Option\\ValidationOption' not found in wp-content/plugins/flexible-checkout-fields/src/Settings/Option/ValidationPostcodeOption.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FcfVendor\\Monolog\\Handler\\Handler' not found in wp-content/plugins/flexible-checkout-fields/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'FcfVendor\\WPDesk\\Logger\\BasicLoggerFactory' not found in wp-content/plugins/flexible-checkout-fields/vendor_prefixed/wpdesk/wp-logs/src/WPDeskLoggerFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FcfVendor\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/flexible-checkout-fields/vendor_prefixed/monolog/monolog/src/Monolog/Test/TestCase.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'FcfVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/flexible-checkout-fields/src/Field/FieldTemplateLoader.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FCF\\Free\\Settings\\Option\\OptionAbstract' not found in wp-content/plugins/flexible-checkout-fields/src/Settings/Option/ExternalFieldInfoOption.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FcfVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/flexible-checkout-fields/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: woocommerce customize checkout, woocommerce custom checkout fields, woocommerce checkout manager, customize woocommerce checkout, woocommerce custom fields checkout...

flexible-checkout-fields/flexible-checkout-fields.php 92% from 13 tests

"Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager" version 3.5.18's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin24,613 lines of code in 549 files:
LanguageFilesBlank linesComment linesLines of code
PHP4952,59413,55622,637
JSON1900952
CSS157956582
JavaScript14416292
Markdown415065
SVG10060
PO File13325

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.76
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces64
Interfaces55
Traits12
Classes391
▷ Abstract classes184.60%
▷ Concrete classes37395.40%
▷ Final classes82.14%
Methods2,056
▷ Static methods994.82%
▷ Public methods1,65580.50%
▷ Protected methods1949.44%
▷ Private methods20710.07%
Functions82
▷ Named functions3947.56%
▷ Anonymous functions4352.44%
Constants296
▷ Global constants51.69%
▷ Class constants29198.31%
▷ Public constants26490.72%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 compressed PNG files occupy 0.14MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flexible-wishlist.png12.35KB5.49KB▼ 55.55%
assets/css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
assets/css/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo@2x.png4.17KB4.47KB0.00%
assets/css/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%