90% wholesale-pricing-woocommerce

Code Review | Product Price by Quantity for WooCommerce

WordPress plugin Product Price by Quantity for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wholesale-pricing...
  • Plugin version: 3.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 84
  • Update frequency: every 26.9 days
  • Top authors: algoritmika (75%)wpcodefactory (26.19%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /16,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.72ms] Passed 4 tests

Analyzing server-side resources used by Product Price by Quantity for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.95 ▼0.90
Dashboard /wp-admin3.31 ▲0.0044.96 ▼2.06
Posts /wp-admin/edit.php3.36 ▲0.0049.26 ▲2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.48 ▼3.11
Media Library /wp-admin/upload.php3.23 ▲0.0035.26 ▼0.82

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Product Price by Quantity for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.57 ▲0.311.67 ▼0.0939.85 ▼3.44
Dashboard /wp-admin2,195 ▲155.59 ▼0.0791.42 ▲0.2042.21 ▲1.42
Posts /wp-admin/edit.php2,097 ▼62.00 ▼0.0338.76 ▼0.5834.35 ▼3.55
Add New Post /wp-admin/post-new.php1,531 ▲223.10 ▲0.02607.30 ▼48.3153.58 ▼6.13
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.0296.47 ▼4.6643.33 ▼1.62

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: product price by quantity, buy more pay more, buy more pay less, wholesale, dynamic pricing...

wholesale-pricing-woocommerce/wholesale-pricing-woocommerce.php Passed 13 tests

This is the main PHP file of "Product Price by Quantity for WooCommerce" version 3.5.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Set WooCommerce product prices depending on quantity in cart.

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
Everything looks great! No dangerous files found in this plugin3,145 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP203611,2763,037
JavaScript4285790
XML10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity25.21
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods125
▷ Static methods10.80%
▷ Public methods125100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin