68% additional-product-fields-for-woocommerce

Code Review | Extra Product Options Builder for WooCommerce

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

About plugin

  • Plugin page: additional-produc...
  • Plugin version: 1.2.100
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 302
  • Update frequency: every 5.3 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

83 reviews

Install metrics

3,000+ active /108,915 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.44MB] [CPU: ▼0.02ms] Passed 4 tests

Server-side resources used by Extra Product Options Builder for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4637.23 ▼6.70
Dashboard /wp-admin3.78 ▲0.4852.12 ▲3.04
Posts /wp-admin/edit.php3.83 ▲0.4750.69 ▲5.87
Add New Post /wp-admin/post-new.php6.31 ▲0.4297.85 ▼2.29
Media Library /wp-admin/upload.php3.64 ▲0.4138.82 ▲7.72
Welcome /wp-admin/index.php?page=woo-extra-product-welcome3.6135.40

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 304 new files
Database: 1 new table, 9 new options
New tables
wp_rednaowooextraproduct_global_table
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
rednao_rednaowooextraproduct_db_version
theysaidso_admin_options
_woo_extra_products_go_to_welcome
AllInOneNoticeTime

Browser metrics Passed 4 tests

This is an overview of 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 /2,886 ▲13914.03 ▼0.251.77 ▲0.0838.26 ▼4.72
Dashboard /wp-admin2,251 ▲765.35 ▼0.23102.30 ▼14.3789.48 ▲46.22
Posts /wp-admin/edit.php2,182 ▲822.67 ▲0.7140.70 ▲1.3042.03 ▲6.21
Add New Post /wp-admin/post-new.php1,588 ▲6223.33 ▲0.14709.45 ▲60.2235.91 ▼13.27
Media Library /wp-admin/upload.php1,463 ▲694.92 ▲0.71101.85 ▲3.0879.13 ▲36.65
Welcome /wp-admin/index.php?page=woo-extra-product-welcome9122.6028.6429.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_rednaowooextraproduct_global_table
  • Zombie WordPress options were found after uninstall: 9 options
    • _woo_extra_products_go_to_welcome
    • widget_recent-comments
    • AllInOneNoticeTime
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • rednao_rednaowooextraproduct_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 perform the action of outputting non-empty strings 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
  • 89× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Calculator/PricePerCharCalculator.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/additional-product-fields-for-woocommerce/jstranslations/ProductFieldBuilder.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
    • > PHP Fatal error
      Uncaught Error: Class 'rednaowooextraproduct\\core\\Managers\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Calculator/GlobalCalculator.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/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/FBAppointment.php:7
    • > 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: 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\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/additional-product-fields-for-woocommerce/core/Managers/FormManager/Calculator/PricePerItemCalculator.php:11
    • > 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/FBSignature.php:11

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can look at the official readme.txt

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

This is the main PHP file of "Extra Product Options Builder for WooCommerce" version 1.2.100, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("additional-product-fields-for-woocommerce.php" instead of "rednaowooextraproduct.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected20,767 lines of code in 259 files:
LanguageFilesBlank linesComment linesLines of code
CSS381,42217811,019
PHP1372,1163407,980
JavaScript733507671,334
PO File1157176339
SVG70763
JSON20026
TypeScript1106

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.48
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces36
Interfaces2
Traits0
Classes121
▷ Abstract classes108.26%
▷ Concrete classes11191.74%
▷ Final classes00.00%
Methods460
▷ Static methods286.09%
▷ Public methods40387.61%
▷ Protected methods81.74%
▷ Private methods4910.65%
Functions20
▷ Named functions15.00%
▷ Anonymous functions1995.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
32 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fieldimages/likertscale.png0.37KB0.44KB0.00%
images/promo.png22.75KB9.66KB▼ 57.52%
images/fieldimages/popup.png0.19KB0.18KB▼ 5.70%
images/fieldimages/textarea.png0.15KB0.11KB▼ 25.49%
images/fieldimages/date.png0.92KB0.74KB▼ 18.96%