83% woo-custom-product-addons

Code Review | Product Addons for Woocommerce - Product Options with Custom Fields

WordPress plugin Product Addons for Woocommerce - Product Options with Custom Fields scored83%from 54 tests.

About plugin

  • Plugin page: woo-custom-produc...
  • Plugin version: 3.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 28, 2018
  • Latest release: Oct 19, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

304 reviews

Install metrics

30,000+ active /975,306 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲3.49ms] Passed 4 tests

Server-side resources used by Product Addons for Woocommerce - Product Options with Custom Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.45 ▲2.10
Dashboard /wp-admin3.89 ▲0.5950.09 ▲2.74
Posts /wp-admin/edit.php3.94 ▲0.5953.18 ▲5.26
Add New Post /wp-admin/post-new.php6.48 ▲0.6095.66 ▲4.95
Media Library /wp-admin/upload.php3.75 ▲0.5238.92 ▲4.15

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 244 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Product Addons for Woocommerce - Product Options with Custom Fields: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.35 ▼0.271.87 ▲0.2442.89 ▼0.43
Dashboard /wp-admin2,205 ▲315.63 ▼0.0384.51 ▲0.4139.38 ▼1.73
Posts /wp-admin/edit.php2,114 ▲141.95 ▼0.0140.03 ▲1.5336.32 ▼0.08
Add New Post /wp-admin/post-new.php1,537 ▲1123.50 ▲0.33609.48 ▼76.1860.13 ▲7.68
Media Library /wp-admin/upload.php1,414 ▲144.17 ▼0.0399.59 ▼10.1542.85 ▼4.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: meta_data in wp-content/plugins/woo-custom-product-addons/includes/order/meta-line-item_v1.php on line 2

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: woocommerce product options, product fields, woocommerce product fields, woocommerce custom product fields, woocommerce product addons...

woo-custom-product-addons/start.php 77% from 13 tests

The principal PHP file in "Product Addons for Woocommerce - Product Options with Custom Fields" v. 3.0.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 174 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-custom-product-addons.php" instead of "start.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.9" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected6,448 lines of code in 215 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,4411,1075,615
SVG10300485
JavaScript7634194
CSS710111
XML110343

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity39.29
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods246
▷ Static methods176.91%
▷ Public methods23394.72%
▷ Protected methods00.00%
▷ Private methods135.28%
Functions51
▷ Named functions3262.75%
▷ Anonymous functions1937.25%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/warning.png1.20KB0.47KB▼ 61.11%
assets/images/premium.png6.60KB4.03KB▼ 38.91%
assets/images/sprite.png1.07KB0.19KB▼ 82.53%
assets/images/icons/warning.png1.20KB0.47KB▼ 61.11%
assets/images/icons/sprite.png1.07KB0.19KB▼ 82.53%