84% soft79-wc-pricing-rules

Code Review | SOFT79 Pricing Rules for WooCommerce

WordPress plugin SOFT79 Pricing Rules for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: soft79-wc-pricing...
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Jan 20, 2020
  • Number of updates: 32
  • Update frequency: every 49.8 days
  • Top authors: josk79 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /5,337 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼1.62ms] Passed 4 tests

A check of server-side resources used by SOFT79 Pricing Rules for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3545.65 ▲5.12
Dashboard /wp-admin3.66 ▲0.3550.81 ▼2.09
Posts /wp-admin/edit.php3.71 ▲0.3551.03 ▼0.85
Add New Post /wp-admin/post-new.php6.18 ▲0.2996.94 ▼8.67
Media Library /wp-admin/upload.php3.52 ▲0.2944.66 ▲8.90

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SOFT79 Pricing Rules for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.361.65 ▼0.0340.45 ▲1.60
Dashboard /wp-admin2,195 ▲155.56 ▼0.02101.46 ▲12.3142.74 ▲2.21
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0138.59 ▲0.0929.29 ▼5.67
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▲0.34689.45 ▲14.7857.29 ▲9.71
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.01105.12 ▼3.5642.03 ▼5.17

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

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

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
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SOFT79_Rule' not found in wp-content/plugins/soft79-wc-pricing-rules/includes/soft79-bulk-rule.php:3
    • > PHP Warning
      include(soft-wc-pricing-rules.php): failed to open stream: No such file or directory in wp-content/plugins/soft79-wc-pricing-rules/soft79-wc-pricing-rules-pro.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SOFT79_Rule_Controller' not found in wp-content/plugins/soft79-wc-pricing-rules/includes/soft79-rule-controller-pro.php:4
    • > PHP Notice
      Undefined variable: show_table in wp-content/plugins/soft79-wc-pricing-rules/templates/single-product/bulk-rule.php on line 10
    • > PHP Notice
      Undefined variable: show_description in wp-content/plugins/soft79-wc-pricing-rules/templates/single-product/bulk-rule.php on line 10
    • > PHP Warning
      include(): Failed opening 'soft-wc-pricing-rules.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/soft79-wc-pricing-rules/soft79-wc-pricing-rules-pro.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: woocommerce, discount, pricing

soft79-wc-pricing-rules/soft79-wc-pricing-rules.php 92% from 13 tests

"SOFT79 Pricing Rules for WooCommerce" version 1.4.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.0" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected2,202 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP124044041,572
PO File3220270577
CSS27119
JavaScript22315
XML10011
JSON1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity26.10
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes333.33%
Methods120
▷ Static methods2924.17%
▷ Public methods10789.17%
▷ Protected methods43.33%
▷ Private methods97.50%
Functions4
▷ Named functions4100.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
No PNG files were detected