90% product-bundles-bulk-discounts-for-woocommerce

Code Review | Product Bundles - Bulk Discounts

WordPress plugin Product Bundles - Bulk Discounts scored90%from 54 tests.

About plugin

  • Plugin page: product-bundles-b...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2020
  • Latest release: Aug 16, 2023
  • Number of updates: 25
  • Update frequency: every 51.7 days
  • Top authors: franticpsyx (76%)jasonkytros (20%)SomewhereWarm (12%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /9,909 total downloads

Benchmarks

Plugin footprint 83% 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.10MB] [CPU: ▼6.31ms] Passed 4 tests

A check of server-side resources used by Product Bundles - Bulk Discounts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.05 ▼1.64
Dashboard /wp-admin3.40 ▲0.1049.12 ▼0.21
Posts /wp-admin/edit.php3.52 ▲0.1648.47 ▼9.18
Add New Post /wp-admin/post-new.php5.98 ▲0.1086.06 ▼14.20
Media Library /wp-admin/upload.php3.33 ▲0.1043.87 ▲9.82

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Bundles - Bulk Discounts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.24 ▼0.111.86 ▲0.2238.64 ▼4.97
Dashboard /wp-admin2,203 ▲265.51 ▼0.1894.84 ▲5.3639.43 ▼2.31
Posts /wp-admin/edit.php2,111 ▲81.98 ▲0.0037.44 ▼3.9534.82 ▼1.61
Add New Post /wp-admin/post-new.php1,537 ▲1123.16 ▼0.43661.27 ▼9.5151.47 ▼1.25
Media Library /wp-admin/upload.php1,414 ▲144.28 ▲0.0797.26 ▼8.1847.23 ▲4.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% 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
8 plugin tags: tiers, woocommerce, product, quantity, rules...

product-bundles-bulk-discounts-for-woocommerce/product-bundles-bulk-discounts-for-woocommerce.php 92% from 13 tests

Analyzing the main PHP file in "Product Bundles - Bulk Discounts" version 1.4.0
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although 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
Success! There were no dangerous files found in this plugin541 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1205306430
JavaScript2463497
CSS13014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity103.00
▷ Minimum class complexity103.00
▷ Maximum class complexity103.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods32100.00%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin