80% dynamic-pricing-quantity-table

Code Review | Woocommerce Quantity Table

WordPress plugin Woocommerce Quantity Table scored80%from 54 tests.

About plugin

  • Plugin page: dynamic-pricing-q...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Jul 29, 2016
  • Number of updates: 8
  • Update frequency: every 6.8 days
  • Top authors: riotweb (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /2,039 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.44ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Quantity Table
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.444.75 ▼37.13
Dashboard /wp-admin2.09 ▼1.265.54 ▼47.24
Posts /wp-admin/edit.php2.09 ▼1.315.87 ▼42.71
Add New Post /wp-admin/post-new.php2.09 ▼3.845.78 ▼90.69
Media Library /wp-admin/upload.php2.09 ▼1.186.17 ▼33.74

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Quantity Table
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.031.74 ▼0.2445.21 ▼0.15
Dashboard /wp-admin2,192 ▲125.55 ▼0.1288.02 ▼9.1938.87 ▼4.45
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0637.69 ▲1.1634.96 ▼0.47
Add New Post /wp-admin/post-new.php1,526 ▼023.66 ▲0.45655.71 ▼33.6652.01 ▼9.29
Media Library /wp-admin/upload.php1,400 ▲64.14 ▼0.0099.47 ▼41.8443.45 ▼5.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_quantity_table_textdomain' not found or invalid function name
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
7 plugin tags: quantity, price, woo, woocommerce, shop...

dynamic-pricing-quantity-table/quantity-table.php 92% from 13 tests

The main PHP file in "Woocommerce Quantity Table" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dynamic-pricing-quantity-table.php" instead of "quantity-table.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191349

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin