89% quantity-increment-buttons-for-woocommerce

Code Review | WooCommerce Quantity Increment

WordPress plugin WooCommerce Quantity Increment scored89%from 54 tests.

About plugin

  • Plugin page: quantity-incremen...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Apr 28, 2020
  • Number of updates: 10
  • Update frequency: every 163.0 days
  • Top authors: greatwitenorth (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /7,785 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by WooCommerce Quantity Increment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.17 ▼1.15
Dashboard /wp-admin3.31 ▼0.0343.93 ▼17.89
Posts /wp-admin/edit.php3.36 ▲0.0043.61 ▼0.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.28 ▼0.48
Media Library /wp-admin/upload.php3.23 ▲0.0032.16 ▼2.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Quantity Increment
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3613.24 ▼1.341.72 ▼0.2239.56 ▼4.72
Dashboard /wp-admin2,213 ▲225.84 ▲0.9495.85 ▼4.6043.16 ▲3.17
Posts /wp-admin/edit.php2,095 ▲62.04 ▼0.0934.94 ▼3.6233.92 ▲0.70
Add New Post /wp-admin/post-new.php1,542 ▲823.28 ▲0.47633.99 ▼15.4149.18 ▼1.69
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0397.30 ▼11.6941.93 ▼6.98

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === quantity-increment-buttons-for-woocommerce === )
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

quantity-increment-buttons-for-woocommerce/woocommerce-quantity-increment-buttons.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Quantity Increment" version 1.1.1
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("quantity-increment-buttons-for-woocommerce.php" instead of "woocommerce-quantity-increment-buttons.php")

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 detected259 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
Sass18179
CSS10567
PHP2315963
JavaScript314650

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity5.50
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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