68% additional-product-fields-for-woocommerce

Code Review | Extra Product Options Builder for WooCommerce

WordPress plugin Extra Product Options Builder for WooCommerce scored 68% from 54 tests.

About plugin

  • Plugin page: additional-produc...
  • Plugin version: 1.2.47
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.9
  • WordPress version: 5.9.2
  • First release: Jul 21, 2019
  • Latest release: Mar 21, 2022
  • Number of updates: 196
  • Update frequency: every 5.0 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

2,000+ active / 36,486 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▼293.86ms] Passed 4 tests

This is a short check of server-side resources used by Extra Product Options Builder for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4255.01 ▲4.85
Dashboard /wp-admin3.79 ▲0.3837.38 ▲3.13
Posts /wp-admin/edit.php4.01 ▲0.3742.57 ▲6.60
Add New Post /wp-admin/post-new.php7.31 ▲0.3496.07 ▼1,183.44
Media Library /wp-admin/upload.php3.73 ▲0.4326.44 ▲0.02
Welcome /wp-admin/index.php?page=woo-extra-product-welcome3.7126.71

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 251 new files
Database: 1 new table, 2 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Extra Product Options Builder for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,872 ▲11816.70 ▲1.105.77 ▲0.012.27 ▼0.37
Dashboard /wp-admin3,000 ▲1397.18 ▲1.06120.79 ▼12.27197.45 ▲34.86
Posts /wp-admin/edit.php2,811 ▲1205.05 ▲1.8177.71 ▲15.24181.42 ▲38.51
Add New Post /wp-admin/post-new.php1,719 ▲5822.93 ▲6.62386.93 ▼24.21191.54 ▲37.20
Media Library /wp-admin/upload.php1,806 ▲1086.95 ▲1.45131.98 ▼20.06217.58 ▲23.73
Welcome /wp-admin/index.php?page=woo-extra-product-welcome1,1744.0262.63120.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_rednaowooextraproduct_global_table
  • The uninstall procedure has failed, leaving 2 options in the database
    • _woo_extra_products_go_to_welcome
    • rednao_rednaowooextraproduct_db_version

Smoke tests 50% 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 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/additional-product-fields-for-woocommerce/pages/Welcome.php
    • > /wp-content/plugins/additional-product-fields-for-woocommerce/templates/cart/cart-item-data.php
    • > /wp-content/plugins/additional-product-fields-for-woocommerce/templates/cart/cart-item-data2.php
  • 73× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/additional-product-fields-for-woocommerce/ProductFieldBuilder.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\ConditionManager\\Comparator\\ComparatorBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/ConditionManager/Comparator/NumericalValueComparator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\SlateGenerator\\Core\odeElementBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/SlateGenerator/Block/Condition.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Fields\\FBFieldBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Fields/FBTextField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Fields\\FBFieldBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Fields/FBGoogleMaps.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Fields\\FBFieldBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Fields/FBNoneField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\Integration\\Fields\\IntegrationFieldBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/Integration/Fields/DateIntegrationField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Fields\\FBTextField' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Fields/FBSlider.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/additional-product-fields-for-woocommerce/jstranslations/InternalShared.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\SlateGenerator\\Core\odeElementBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/SlateGenerator/Text/Span.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 90% 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: The official readme.txt is a good inspiration

additional-product-fields-for-woocommerce/rednaowooextraproduct.php 85% from 13 tests

"Extra Product Options Builder for WooCommerce" version 1.2.47's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("additional-product-fields-for-woocommerce.php" instead of "rednaowooextraproduct.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 plugin12,838 lines of code in 221 files:
LanguageFilesBlank linesComment linesLines of code
PO File1157176339

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
▷ Abstract classes98.04%
▷ Concrete classes10391.96%
▷ Final classes00.00%
▷ Static methods245.69%
▷ Public methods36987.44%
▷ Protected methods71.66%
▷ Private methods4610.90%
▷ Named functions16.25%
▷ Anonymous functions1593.75%
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/welcome/screenshot2.png47.61KB17.91KB▼ 62.39%
images/fieldimages/numeric.png3.00KB0.30KB▼ 90.06%
images/fieldimages/group.png0.49KB0.44KB▼ 10.42%
images/fieldimages/textinput.png0.24KB0.17KB▼ 28.74%
images/promo.png22.75KB9.66KB▼ 57.52%