89% smntcs-woocommerce-quantity-buttons

Code Review | SMNTCS Quantity Increment Buttons for WooCommerce

WordPress plugin SMNTCS Quantity Increment Buttons for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: smntcs-woocommerc...
  • Plugin version: 2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: Oct 2, 2023
  • Number of updates: 70
  • Update frequency: every 28.8 days
  • Top authors: nielslange (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /54,271 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.02MB] [CPU: ▼0.42ms] Passed 4 tests

This is a short check of server-side resources used by SMNTCS Quantity Increment Buttons for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.64 ▲0.06
Dashboard /wp-admin3.33 ▲0.0346.09 ▲1.36
Posts /wp-admin/edit.php3.38 ▲0.0243.71 ▲0.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0282.19 ▼3.52
Media Library /wp-admin/upload.php3.26 ▲0.0237.34 ▲4.46

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SMNTCS Quantity Increment Buttons for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.18 ▼0.472.00 ▲0.3840.55 ▼0.19
Dashboard /wp-admin2,209 ▲325.57 ▼0.1185.19 ▲0.1738.56 ▼1.32
Posts /wp-admin/edit.php2,111 ▲321.98 ▼0.0134.00 ▼2.1033.69 ▼3.14
Add New Post /wp-admin/post-new.php1,543 ▲1418.21 ▼4.80621.80 ▼4.5982.83 ▲29.28
Media Library /wp-admin/upload.php1,414 ▲114.18 ▲0.04103.54 ▲8.9745.73 ▲3.27

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce quantity, quantity increment, quantity, quantity buttons

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

This is the main PHP file of "SMNTCS Quantity Increment Buttons for WooCommerce" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("smntcs-woocommerce-quantity-buttons.php" instead of "woocommerce-quantity-buttons.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected33,588 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON50033,065
PHP23179167
Markdown1850124
Sass413090
JavaScript55779
XML1131451
YAML1008
CSS4444

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.46MB with 0.30MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png127.37KB30.51KB▼ 76.05%
assets/images/screenshot-1.png347.17KB156.32KB▼ 54.97%