84% product-quantity-dropdown-for-woocommerce

Code Review | Product Quantity Dropdown For Woocommerce

WordPress plugin Product Quantity Dropdown For Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-quantity-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: May 13, 2022
  • Latest release: Oct 2, 2023
  • Number of updates: 9
  • Update frequency: every 56.3 days
  • Top authors: silverplugins217 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Product Quantity Dropdown For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.19 ▼0.36
Dashboard /wp-admin3.31 ▲0.0049.24 ▼6.39
Posts /wp-admin/edit.php3.36 ▲0.0047.67 ▼0.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.83 ▼11.86
Media Library /wp-admin/upload.php3.23 ▲0.0039.47 ▲3.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Product Quantity Dropdown For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.42 ▼0.161.73 ▼0.0543.58 ▼0.01
Dashboard /wp-admin2,195 ▲155.57 ▼0.1094.96 ▲2.9739.38 ▼0.97
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0138.08 ▼1.2133.12 ▼2.03
Add New Post /wp-admin/post-new.php1,536 ▲1022.95 ▼0.67668.80 ▼42.7747.00 ▼4.69
Media Library /wp-admin/upload.php1,400 ▼04.26 ▼0.10107.18 ▲7.6548.13 ▲2.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/resources/pqdfw-language.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/resources/pqdfw-installation-require.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/resources/pqdfw-load-js-css.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/backend/pqdfw_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/backend/pqdfw_comman.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-dropdown-for-woocommerce/main/frontend/pqdfw-frontend.php:258

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #5 (Shop page products quantity dropdown)
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

product-quantity-dropdown-for-woocommerce/product-quantity-dropdown-for-woocommerce.php Passed 13 tests

The entry point to "Product Quantity Dropdown For Woocommerce" version 1.1 is a PHP file that has certain tags in its header comment area
79 characters long description:
This plugin allows Product Quantity dropdown add in Shop page and Product page.

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
No dangerous file extensions were detected610 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP77644488
CSS21086
JavaScript210336

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected