84% wpc-price-by-quantity

Code Review | WPC Price by Quantity for WooCommerce

WordPress plugin WPC Price by Quantity for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wpc-price-by-quan...
  • Plugin version: 4.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 32
  • Update frequency: every 14.7 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /6,726 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.61ms] Passed 4 tests

An overview of server-side resources used by WPC Price by Quantity for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.10 ▼4.10
Dashboard /wp-admin3.39 ▲0.0548.50 ▼17.31
Posts /wp-admin/edit.php3.51 ▲0.1550.39 ▲2.22
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.43 ▼11.23
Media Library /wp-admin/upload.php3.32 ▲0.0944.89 ▲13.60
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.5031.50
About /wp-admin/admin.php?page=wpclever3.2833.63

Server storage [IO: ▲0.19MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Price by Quantity for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12014.30 ▼0.411.53 ▼0.1237.96 ▼7.76
Dashboard /wp-admin2,272 ▲925.53 ▼0.1192.55 ▼6.9375.17 ▲29.40
Posts /wp-admin/edit.php2,178 ▲782.01 ▲0.0437.79 ▼1.2334.11 ▼0.03
Add New Post /wp-admin/post-new.php1,753 ▲22722.07 ▼1.07754.60 ▲137.5353.06 ▲3.77
Media Library /wp-admin/upload.php1,474 ▲744.13 ▼0.0499.48 ▲4.9167.86 ▲26.42
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7442.1637.0661.19
About /wp-admin/admin.php?page=wpclever1,3992.2332.3332.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpc-price-by-quantity/wpc-price-by-quantity.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

wpc-price-by-quantity/wpc-price-by-quantity.php 92% from 13 tests

The principal PHP file in "WPC Price by Quantity for WooCommerce" v. 4.1.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 288 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin4,114 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP11259461,592
CSS52851501,379
JavaScript49522510
Sass2790495
PO File13639109
SVG10029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.25
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods62
▷ Static methods1727.42%
▷ Public methods6096.77%
▷ Protected methods00.00%
▷ Private methods23.23%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.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
PNG images were not found in this plugin