84% wc-bulk-buyer-discounts

Code Review | WC Bulk Buyer Discounts

WordPress plugin WC Bulk Buyer Discounts scored84%from 54 tests.

About plugin

  • Plugin page: wc-bulk-buyer-dis...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Mar 19, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: hallnet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,142 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.02MB] [CPU: ▼9.95ms] Passed 4 tests

Analyzing server-side resources used by WC Bulk Buyer Discounts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.62 ▼2.28
Dashboard /wp-admin3.34 ▼0.0045.23 ▼17.86
Posts /wp-admin/edit.php3.39 ▲0.0446.43 ▼4.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.83 ▼15.54
Media Library /wp-admin/upload.php3.26 ▲0.0439.24 ▲6.58
WCBBD Settings /wp-admin/options-general.php?page=wc-bulk-buyer-discounts/wc-bulk-buyer-discounts.php3.2332.80

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WC Bulk Buyer Discounts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.30 ▼0.995.11 ▲3.2440.03 ▼5.59
Dashboard /wp-admin2,213 ▲255.88 ▲0.97102.54 ▼4.1640.95 ▼1.61
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0233.84 ▼2.6333.83 ▼3.52
Add New Post /wp-admin/post-new.php1,536 ▲1723.26 ▲0.08681.14 ▲82.9754.22 ▲6.45
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0493.24 ▼7.5840.45 ▼3.99
WCBBD Settings /wp-admin/options-general.php?page=wc-bulk-buyer-discounts/wc-bulk-buyer-discounts.php8542.1722.8327.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wc-bulk-buyer-discounts/wc-bulk-buyer-discounts.php:28

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 Passed 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
4 plugin tags: coupons, bulk buyer discount, custom discounts, woocommerce

wc-bulk-buyer-discounts/wc-bulk-buyer-discounts.php Passed 13 tests

"WC Bulk Buyer Discounts" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
105 characters long description:
WC Bulk Buyer Discounts is a simple discount plugin for Woocommerce using automatic one use only coupons.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin139 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12152139

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin