79% variation-price-display

Code Review | Variation Price Display Range for WooCommerce

WordPress plugin Variation Price Display Range for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: variation-price-d...
  • Plugin version: 1.3.11
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Oct 28, 2021
  • Latest release: Nov 26, 2023
  • Number of updates: 72
  • Update frequency: every 10.5 days
  • Top authors: wpxteam (59.72%)Hakik (41.67%)

Code review

54 tests

User reviews

33 reviews

Install metrics

7,000+ active /47,575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.39ms] Passed 4 tests

This is a short check of server-side resources used by Variation Price Display Range for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.80 ▼2.55
Dashboard /wp-admin3.34 ▼0.0149.02 ▼16.19
Posts /wp-admin/edit.php3.39 ▲0.0348.47 ▲3.39
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.91 ▼1.89
Media Library /wp-admin/upload.php3.26 ▲0.0337.01 ▲3.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Variation Price Display Range for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7614.34 ▼0.011.58 ▼0.0336.80 ▼6.76
Dashboard /wp-admin2,203 ▲265.63 ▲0.0290.94 ▼7.1241.58 ▼4.64
Posts /wp-admin/edit.php2,108 ▲82.01 ▲0.0741.87 ▲2.4636.52 ▲1.28
Add New Post /wp-admin/post-new.php1,539 ▲923.29 ▲0.15587.20 ▼94.4852.76 ▼7.88
Media Library /wp-admin/upload.php1,411 ▲84.21 ▲0.0195.97 ▼4.0941.15 ▼2.79

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

Smoke tests 50% from 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/variation-price-display/includes/class-variation-price-display.php
    • > /wp-content/plugins/variation-price-display/variation-price-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/variation-price-display/includes/setting-tab/advanced.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/variation-price-display/includes/layout.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/variation-price-display/includes/setting-tab/general.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: woocommerce variation price, price range, price display, woocommerce show from price, woocommerce remove price range...

variation-price-display/variation-price-display.php Passed 13 tests

"Variation Price Display Range for WooCommerce" version 1.3.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
106 characters long description:
Adds lots of advanced options to control how you display the price for your WooCommerce variable products.

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
No dangerous file extensions were detected1,758 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP104321961,402
CSS74018217
JavaScript56235139

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.50
Average class complexity28.83
▷ Minimum class complexity2.00
▷ Maximum class complexity51.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods59
▷ Static methods2542.37%
▷ Public methods59100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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