83% flexible-woocommerce-checkout-field-editor

Code Review | Flexible Woocommerce Checkout Field Editor

WordPress plugin Flexible Woocommerce Checkout Field Editor scored83%from 54 tests.

About plugin

  • Plugin page: flexible-woocomme...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2016
  • Latest release: Nov 5, 2022
  • Number of updates: 54
  • Update frequency: every 42.5 days
  • Top authors: heolixfy (100%)

Code review

54 tests

User reviews

58 reviews

Install metrics

1,000+ active /28,515 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.06MB] [CPU: ▼5.41ms] Passed 4 tests

Analyzing server-side resources used by Flexible Woocommerce Checkout Field Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.06 ▲2.53
Dashboard /wp-admin3.37 ▲0.0344.77 ▼16.45
Posts /wp-admin/edit.php3.49 ▲0.1344.89 ▼0.36
Add New Post /wp-admin/post-new.php5.95 ▲0.0789.53 ▼4.57
Media Library /wp-admin/upload.php3.29 ▲0.0735.15 ▼0.24

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

Browser metrics Passed 4 tests

A check of browser resources used by Flexible Woocommerce Checkout Field Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.30 ▼1.101.74 ▼0.1441.74 ▼3.96
Dashboard /wp-admin2,206 ▲174.85 ▼0.09110.99 ▼8.2537.37 ▼8.44
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.56 ▲3.3534.22 ▼0.87
Add New Post /wp-admin/post-new.php1,533 ▼023.25 ▼0.27669.02 ▼2.7460.26 ▼2.26
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.0499.12 ▼8.7845.17 ▲2.85

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/flexible-woocommerce-checkout-field-editor/assets/fields-editor.php

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 83% from 29 tests

readme.txt 81% 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
These attributes need to be fixed: The official readme.txt is a good inspiration

flexible-woocommerce-checkout-field-editor/flexible-checkout-field-editor.php 85% from 13 tests

The principal PHP file in "Flexible Woocommerce Checkout Field Editor" v. 2.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("flexible-woocommerce-checkout-field-editor.php" instead of "flexible-checkout-field-editor.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.2" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected6,623 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS652703,409
JavaScript81873531,530
SVG100685
PHP214012518
HTML14510481

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.83
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods40
▷ Static methods40100.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
23 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendors/jqueryui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%
assets/vendors/jqueryui/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/vendors/jqueryui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
assets/vendors/jqueryui/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
assets/vendors/jqueryui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%