90% qty-increment-buttons-for-woocommerce

Code Review | Qty Increment Buttons for WooCommerce

WordPress plugin Qty Increment Buttons for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: qty-increment-but...
  • Plugin version: 2.7.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.5
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Aug 21, 2020
  • Number of updates: 66
  • Update frequency: every 7.0 days
  • Top authors: taisho (100%)

Code review

54 tests

User reviews

309 reviews

Install metrics

10,000+ active /88,247 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼2.24ms] Passed 4 tests

An overview of server-side resources used by Qty Increment Buttons for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1253.19 ▲8.68
Dashboard /wp-admin3.45 ▲0.1549.24 ▼2.95
Posts /wp-admin/edit.php3.57 ▲0.2155.72 ▼0.45
Add New Post /wp-admin/post-new.php6.03 ▲0.1486.06 ▼3.31
Media Library /wp-admin/upload.php3.37 ▲0.1440.96 ▼2.23
Qty Increment Buttons /wp-admin/options-general.php?page=qty-increment-buttons3.3432.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Qty Increment Buttons for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.29 ▼0.874.79 ▲2.5342.68 ▼4.04
Dashboard /wp-admin2,212 ▲244.81 ▼0.11108.17 ▼8.4637.88 ▼2.59
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0439.25 ▲1.4335.31 ▼1.43
Add New Post /wp-admin/post-new.php1,539 ▲623.32 ▲0.26682.59 ▼25.4252.20 ▼2.82
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.01101.67 ▼3.1453.04 ▲1.44
Qty Increment Buttons /wp-admin/options-general.php?page=qty-increment-buttons9932.0424.2229.34

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
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: quantity, buttons, woocommerce, qty, increment

qty-increment-buttons-for-woocommerce/qty-increment-buttons-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Qty Increment Buttons for WooCommerce" version 2.7.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected775 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5137105766
JavaScript1209

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity20.50
▷ Minimum class complexity6.00
▷ Maximum class complexity35.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin