56% bundler

Code Review | Bundler - WooCommerce Product Bundles, Discounts and Dynamic Pricing

WordPress plugin Bundler - WooCommerce Product Bundles, Discounts and Dynamic Pricing scored56%from 54 tests.

About plugin

  • Plugin page: bundler
  • Plugin version: 2.1.5.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2022
  • Latest release: Dec 3, 2023
  • Number of updates: 71
  • Update frequency: every 7.5 days
  • Top authors: woobundlescom (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

80+ active /3,719 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▲2.30ms] Passed 4 tests

This is a short check of server-side resources used by Bundler - WooCommerce Product Bundles, Discounts and Dynamic Pricing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4826.55 ▼15.21
Dashboard /wp-admin3.90 ▲0.6055.13 ▲5.08
Posts /wp-admin/edit.php3.95 ▲0.5954.54 ▲8.36
Add New Post /wp-admin/post-new.php6.50 ▲0.61103.28 ▲10.95
Media Library /wp-admin/upload.php3.82 ▲0.5946.01 ▲13.43
Go Pro /wp-admin/admin.php?page=bundler/upgrade3.7039.04
Settings /wp-admin/admin.php?page=bundler/settings3.7638.75
+ Add Offer /wp-admin/admin.php?page=bundler/add-offer3.7635.91
Offers /wp-admin/admin.php?page=bundler/offers3.7838.58

Server storage [IO: ▲0.79MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 57 new files
Database: 3 new tables, 7 new options
New tables
wp_wbdl_bundle
wp_wbdl_offer
wp_wbdl_settings
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
woobundles_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Bundler - WooCommerce Product Bundles, Discounts and Dynamic Pricing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,620 ▼14213.27 ▼1.090.50 ▼1.207.65 ▼36.58
Dashboard /wp-admin2,342 ▲1655.96 ▲0.32104.80 ▲13.8948.19 ▲2.92
Posts /wp-admin/edit.php2,255 ▲1552.36 ▲0.3042.43 ▲1.9837.15 ▲1.95
Add New Post /wp-admin/post-new.php1,627 ▲10123.69 ▲0.51676.47 ▲50.2748.75 ▼5.16
Media Library /wp-admin/upload.php1,551 ▲1544.48 ▲0.25113.67 ▲17.1849.49 ▲9.38
Go Pro /wp-admin/admin.php?page=bundler/upgrade7991.5812.0021.80
Settings /wp-admin/admin.php?page=bundler/settings1,2241.8930.4739.02
+ Add Offer /wp-admin/admin.php?page=bundler/add-offer1,6392.3342.8150.62
Offers /wp-admin/admin.php?page=bundler/offers1,1522.0131.6236.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 3 tables
    • wp_wbdl_offer
    • wp_wbdl_bundle
    • wp_wbdl_settings
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • woobundles_db_version
    • db_upgraded
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=bundler/upgrade
    • > Warning in wp-content/plugins/bundler/App/Views/admin/SettingsPage.php+120
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
    • > GET request to /wp-admin/admin.php?page=bundler/add-offer
    • > Notice in wp-content/plugins/bundler/App/Views/admin/templates/offers/offer-form.php+8
    Undefined variable: offer_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bundler/add-offer
    • > Notice in wp-content/plugins/bundler/App/Views/admin/templates/offers/discount-rules-form.php+14
    Undefined variable: bundles
    • > GET request to /wp-admin/admin.php?page=bundler/offers
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bundler/App/Views/templates/classic.php
    • > /wp-content/plugins/bundler/App/Views/admin/templates/settings/license-settings.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: bundles in wp-content/plugins/bundler/App/Views/admin/templates/offers/discount-rules-form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Bundler\\Controllers\\OfferController' not found in wp-content/plugins/bundler/App/Views/admin/templates/offers/offer-form.php:5
    • > PHP Warning
      Use of undefined constant WBDL_PLUGIN_URL - assumed 'WBDL_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bundler/App/Views/admin/templates/settings/template-settings.php on line 8
    • > PHP Warning
      Use of undefined constant WBDL_PRO - assumed 'WBDL_PRO' (this will throw an Error in a future version of PHP) in wp-content/plugins/bundler/App/Views/admin/templates/settings/license-settings.php on line 5
    • > PHP Warning
      Use of undefined constant WBDL_PRO - assumed 'WBDL_PRO' (this will throw an Error in a future version of PHP) in wp-content/plugins/bundler/App/Views/admin/templates/settings/design-settings.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'WBDL_PLUGIN_DIRApp/Views/admin/OffersTable.php' (include_path='.:/usr/share/php') in wp-content/plugins/bundler/App/Views/admin/templates/offers/offers.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_pro() in wp-content/plugins/bundler/App/Views/admin/templates/settings/design-settings.php:17
    • > PHP Warning
      Use of undefined constant WBDL_PLUGIN_DIR - assumed 'WBDL_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bundler/App/Views/admin/templates/offers/offers.php on line 3
    • > PHP Warning
      require_once(WBDL_PLUGIN_DIRApp/Views/admin/OffersTable.php): failed to open stream: No such file or directory in wp-content/plugins/bundler/App/Views/admin/templates/offers/offers.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/bundler/App/Views/templates/classic.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=bundler/upgrade
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).selectWoo is not a function" "TypeError: $(...).selectWoo is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/bundler/assets/admin/js/admin.js?ver=2.5.1:511:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=bundler/upgrade
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).selectWoo is not a function

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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Showing the product bundles on the front end (variable product))
Please take inspiration from this readme.txt

bundler/bundler.php 85% from 13 tests

"Bundler - WooCommerce Product Bundles, Discounts and Dynamic Pricing" version 2.1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected13,040 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,3454775,577
PHP309311,4654,489
CSS6435672,561
Markdown1820255
XML161195
JSON10045
SVG20018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.26
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods189
▷ Static methods4322.75%
▷ Public methods15179.89%
▷ Protected methods73.70%
▷ Private methods3116.40%
Functions18
▷ Named functions1372.22%
▷ Anonymous functions527.78%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/royal.png5.99KB2.38KB▼ 60.32%
assets/images/Bundler-main-logo.png2.87KB2.29KB▼ 20.36%
assets/images/vertical.png6.00KB2.54KB▼ 57.68%
assets/images/classic.png4.87KB2.05KB▼ 57.78%