67% woocommerce-product-addon

Code Review | Product Addons & Fields for WooCommerce

WordPress plugin Product Addons & Fields for WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 32.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.5-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2015
  • Latest release: Aug 31, 2023
  • Number of updates: 360
  • Update frequency: every 8.5 days
  • Top authors: nmedia (93.33%)themeisle (6.94%)

Code review

54 tests

User reviews

246 reviews

Install metrics

20,000+ active /986,484 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.90ms] Passed 4 tests

Analyzing server-side resources used by Product Addons & Fields for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1946.05 ▲5.98
Dashboard /wp-admin3.51 ▲0.2055.53 ▼4.50
Posts /wp-admin/edit.php3.54 ▲0.1956.49 ▲6.08
Add New Post /wp-admin/post-new.php6.08 ▲0.2091.51 ▼23.17
Media Library /wp-admin/upload.php3.41 ▲0.1944.38 ▲8.75
PPOM Fields /wp-admin/admin.php?page=ppom3.6449.10

Server storage [IO: ▲8.93MB] [DB: ▲0.38MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 347 new files
Database: 1 new table, 10 new options
New tables
wp_nm_personalized
New WordPress options
ppom_demo_meta_installed
widget_recent-comments
woocommerce_product_addon_install
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
personalizedproduct_db_version
db_upgraded
ppom_settings_migration_done
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Product Addons & Fields for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15614.26 ▼0.091.81 ▲0.2233.95 ▼8.71
Dashboard /wp-admin2,326 ▲1465.69 ▲0.0486.56 ▼7.2147.12 ▲6.29
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.1738.88 ▲0.1834.53 ▲0.17
Add New Post /wp-admin/post-new.php1,531 ▲523.19 ▼0.37652.05 ▲1.0762.90 ▲2.51
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.01100.27 ▼2.4742.39 ▼3.54
PPOM Fields /wp-admin/admin.php?page=ppom1,4154.6575.0737.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_nm_personalized
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • woocommerce_product_addon_install
    • ppom_settings_migration_done
    • can_compress_scripts
    • theysaidso_admin_options
    • ppom_demo_meta_installed
    • widget_theysaidso_widget
    • db_upgraded
    • personalizedproduct_db_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/woocommerce-product-addon/classes/admin.class.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/admin.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/files.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/functions.php
    • > /wp-content/plugins/woocommerce-product-addon/classes/fields.class.php
    • > /wp-content/plugins/woocommerce-product-addon/templates/admin/addons-list.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/hooks.php
    • > /wp-content/plugins/woocommerce-product-addon/inc/arrays.php
    • > /wp-content/plugins/woocommerce-product-addon/templates/admin/products-list.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.daterange.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.palettes.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.cropper.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.email.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.select.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.image.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.textarea.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.color.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.section.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PPOM_Inputs' not found in wp-content/plugins/woocommerce-product-addon/classes/inputs/input.audio.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: woocommerce product options, woocommerce product fields, woocommerce product, woocommerce product addon, woocommerce product addons

woocommerce-product-addon/woocommerce-product-addon.php 85% from 13 tests

The main PHP file in "Product Addons & Fields for WooCommerce" ver. 32.0.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("3.5" instead of "6.5")
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin89,278 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP1286,2805,31724,512
PO File117,92912,02620,964
JavaScript423,5092,00919,003
CSS291,89445718,240
SVG2002,702
Sass1434341,768
LESS1434441,758
Markdown32080281
JSON20050

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 141)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity27.47
▷ Minimum class complexity1.00
▷ Maximum class complexity196.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity141.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes60
▷ Abstract classes11.67%
▷ Concrete classes5998.33%
▷ Final classes11.69%
Methods521
▷ Static methods9217.66%
▷ Public methods43483.30%
▷ Protected methods30.58%
▷ Private methods8416.12%
Functions245
▷ Named functions21487.35%
▷ Anonymous functions3112.65%
Constants28
▷ Global constants1242.86%
▷ Class constants1657.14%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
64 PNG files occupy 2.04MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/codeinwp/themeisle-sdk/assets/images/otter/otter-builder.png26.41KB26.24KB▼ 0.63%
.wordpress-org/screenshot-2.png146.07KB40.35KB▼ 72.37%
js/images/sort_desc.png0.15KB0.25KB0.00%
images/delete.png5.62KB1.78KB▼ 68.26%
js/images/sort_asc_disabled.png0.14KB0.25KB0.00%