84% enable-quantity-field-on-shop-page-for-woocommerce

Code Review | Enable Quantity Field On Shop Page for WooCommerce

WordPress plugin Enable Quantity Field On Shop Page for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: enable-quantity-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 6.3.1
  • First release: Apr 26, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: istatechie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.74ms] Passed 4 tests

Analyzing server-side resources used by Enable Quantity Field On Shop Page for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.19 ▼4.76
Dashboard /wp-admin3.31 ▲0.0044.50 ▼2.47
Posts /wp-admin/edit.php3.36 ▲0.0046.26 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.91 ▼1.65
Media Library /wp-admin/upload.php3.23 ▲0.0032.69 ▼0.43
Quantity Field on Shop Page /wp-admin/admin.php?page=istwqfs-quantity-field3.0023.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Enable Quantity Field On Shop Page for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.39 ▼1.001.73 ▼0.4143.70 ▼3.41
Dashboard /wp-admin2,206 ▲184.86 ▼0.21107.93 ▼1.1842.22 ▼2.27
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0439.04 ▼2.6034.45 ▲1.16
Add New Post /wp-admin/post-new.php1,545 ▲1218.69 ▼4.42605.69 ▼75.3255.75 ▲0.15
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0496.07 ▼4.2140.95 ▼4.91
Quantity Field on Shop Page /wp-admin/admin.php?page=istwqfs-quantity-field280.440.073.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=istwqfs-quantity-field
    • > Network (severe)
    wp-admin/admin.php?page=istwqfs-quantity-field - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: quantity, woocommerce, shop page, shop, quantity field

enable-quantity-field-on-shop-page-for-woocommerce/enable-quantity-field-on-shop-page-for-woocommerce.php Passed 13 tests

The main file in "Enable Quantity Field On Shop Page for WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
This plugin allows you to Create Quantity Field on WooCommerce Shop Page and Product Category Pages...

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin742 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript261146312
PHP47231294
CSS200136

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.33
▷ Minimum class complexity10.00
▷ Maximum class complexity16.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods15
▷ Static methods320.00%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/check-mark.png4.33KB2.52KB▼ 41.85%