89% woo-product-price-x-quantity-preview

Code Review | WooCommerce Product Price x Quantity Preview

WordPress plugin WooCommerce Product Price x Quantity Preview scored89%from 54 tests.

About plugin

  • Plugin page: woo-product-price...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Nov 27, 2018
  • Number of updates: 16
  • Update frequency: every 28.8 days
  • Top authors: reigelgallarde (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /8,354 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.51ms] Passed 4 tests

A check of server-side resources used by WooCommerce Product Price x Quantity Preview
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.02 ▼13.90
Dashboard /wp-admin3.32 ▲0.0250.46 ▼7.41
Posts /wp-admin/edit.php3.37 ▲0.0155.88 ▲6.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.95 ▼11.39
Media Library /wp-admin/upload.php3.24 ▲0.0139.36 ▲2.66

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/woo-product-price-x-quantity-preview/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product Price x Quantity Preview
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.46 ▲0.081.82 ▼0.1039.18 ▼10.74
Dashboard /wp-admin2,218 ▲184.88 ▼0.98124.79 ▲22.2844.04 ▲1.61
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0436.56 ▼5.0632.56 ▼4.48
Add New Post /wp-admin/post-new.php1,545 ▲1422.88 ▼0.17669.81 ▲8.1458.17 ▲1.68
Media Library /wp-admin/upload.php1,394 ▼34.21 ▼0.0498.57 ▼0.8442.33 ▼2.61

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: dynamic price, woocommerce, price display, final price, price times quantity...

woo-product-price-x-quantity-preview/woocommerce-product-price-x-quantity-preview.php 85% from 13 tests

The entry point to "WooCommerce Product Price x Quantity Preview" version 1.2.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-product-price-x-quantity-preview.php" instead of "woocommerce-product-price-x-quantity-preview.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.8" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin174 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2303594
JavaScript111165
PO File11115

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin