83% replace-variable-price-range-by-chosen-variation-price-woocommerce

Code Review | WooCommerce - Replace the Variable Price range by the chosen variation price

WordPress plugin WooCommerce - Replace the Variable Price range by the chosen variation price scored83%from 54 tests.

About plugin

  • Plugin page: replace-variable-...
  • Plugin version: 2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2018
  • Latest release: Feb 17, 2020
  • Number of updates: 19
  • Update frequency: every 23.1 days
  • Top authors: lauradiaz (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /9,792 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 successfully, without throwing any errors or notices

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

Server-side resources used by WooCommerce - Replace the Variable Price range by the chosen variation price
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.00 ▲4.99
Dashboard /wp-admin3.31 ▲0.0157.84 ▲10.55
Posts /wp-admin/edit.php3.36 ▲0.0047.69 ▼1.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.26 ▼17.40
Media Library /wp-admin/upload.php3.23 ▲0.0034.67 ▲3.98

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce - Replace the Variable Price range by the chosen variation price
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.061.86 ▲0.2339.75 ▼4.80
Dashboard /wp-admin2,209 ▲244.86 ▼0.06112.03 ▲3.2841.94 ▼0.85
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0139.23 ▲1.1036.65 ▲3.48
Add New Post /wp-admin/post-new.php1,534 ▲1523.26 ▼0.04597.67 ▼56.9659.72 ▲1.09
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0297.62 ▼3.5941.57 ▼1.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/replace-variable-price-range-by-chosen-variation-price-woocommerce/replace-variable-price-range-by-chosen-variation-price-woocommerce.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (WooCommerce variable product before plugin activation.), #2 (WooCommerce variable product after activation.)
Please take inspiration from this readme.txt

replace-variable-price-range-by-chosen-variation-price-woocommerce/replace-variable-price-range-by-chosen-variation-price-woocommerce.php 77% from 13 tests

"WooCommerce - Replace the Variable Price range by the chosen variation price" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 77 characters long)

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
No dangerous file extensions were detected65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122065

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
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
PNG images were not found in this plugin