84% extra-checkout-fields-for-woocommerce

Code Review | Checkout Field Editor and Manager for WooCommerce

WordPress plugin Checkout Field Editor and Manager for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: extra-checkout-fi...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Nov 18, 2022
  • Number of updates: 19
  • Update frequency: every 22.1 days
  • Top authors: themeparrot (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 2,289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Checkout Field Editor and Manager for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.95 ▼1.18
Dashboard /wp-admin3.31 ▲0.0045.34 ▼2.18
Posts /wp-admin/edit.php3.36 ▲0.0047.81 ▲4.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.98 ▼3.89
Media Library /wp-admin/upload.php3.23 ▲0.0032.86 ▼5.52

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

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

Browser metrics Passed 4 tests

Checkout Field Editor and Manager for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.19 ▼0.981.84 ▼0.4043.43 ▼0.65
Dashboard /wp-admin2,206 ▲184.88 ▼1.02100.62 ▼6.6040.61 ▼2.43
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0639.24 ▲5.1034.75 ▼1.67
Add New Post /wp-admin/post-new.php1,535 ▲1623.32 ▲0.21615.24 ▼54.1647.42 ▼21.15
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0594.42 ▲0.2242.50 ▼0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Almost there! Just 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 plugin_dir_path() in wp-content/plugins/extra-checkout-fields-for-woocommerce/config.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

extra-checkout-fields-for-woocommerce/extra-checkout-fields-for-woocommerce.php Passed 13 tests

The primary PHP file in "Checkout Field Editor and Manager for WooCommerce" version 1.1.2 is used by WordPress to initiate all plugin functionality
79 characters long description:
Helps to edit WooCommerce checkout fields, add custom checkout fields and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,342 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP273765782,240
CSS216174
JavaScript391728

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity17.05
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods108
▷ Static methods5752.78%
▷ Public methods10799.07%
▷ Protected methods00.00%
▷ Private methods10.93%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants16
▷ Global constants16100.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
No PNG files were detected