84% woocommerce-bundle-style-coupons

Code Review | WooCommerce Bundle Style Coupons

WordPress plugin WooCommerce Bundle Style Coupons scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-bundl...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2013
  • Latest release: Jan 18, 2023
  • Number of updates: 6
  • Update frequency: every 592.7 days
  • Top authors: CoenJacobs (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /10,019 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.66ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Bundle Style Coupons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.82 ▼5.86
Dashboard /wp-admin3.32 ▲0.0246.52 ▼0.45
Posts /wp-admin/edit.php3.37 ▲0.0150.34 ▲1.81
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.99 ▲0.38
Media Library /wp-admin/upload.php3.24 ▲0.0132.28 ▼0.69

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Bundle Style Coupons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.34 ▼0.951.62 ▼0.5637.18 ▼11.35
Dashboard /wp-admin2,209 ▲215.88 ▼0.02107.45 ▼5.0141.64 ▼0.71
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0140.57 ▼0.3836.41 ▲1.46
Add New Post /wp-admin/post-new.php1,537 ▲423.35 ▲0.28653.08 ▼46.3749.91 ▼7.66
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.03100.58 ▼1.0942.55 ▼1.77

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-bundle-style-coupons/wc-bundle-style-coupons.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: woocommerce

woocommerce-bundle-style-coupons/wc-bundle-style-coupons.php 85% from 13 tests

The entry point to "WooCommerce Bundle Style Coupons" version 0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5" instead of "3.9.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-bundle-style-coupons.php" instead of "wc-bundle-style-coupons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2163954
PO File13425
Markdown1408

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin