Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.15MB] [CPU: ▼4.79ms] Passed 4 tests
This is a short check of server-side resources used by Default Quantity for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 39.08 ▼2.01 |
Dashboard /wp-admin | 3.51 ▲0.21 | 52.23 ▼0.28 |
Posts /wp-admin/edit.php | 3.56 ▲0.21 | 44.60 ▼7.09 |
Add New Post /wp-admin/post-new.php | 6.03 ▲0.14 | 84.92 ▼8.87 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 38.10 ▼1.17 |
Server storage [IO: ▲6.66MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,796 new files
Database: no new tables, 8 new options
New WordPress options |
---|
dqfwc_version |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
dqfwc_installed |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Default Quantity for WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.37 ▲0.01 | 1.77 ▼0.19 | 42.25 ▼4.35 |
Dashboard /wp-admin | 2,192 ▲15 | 5.62 ▼0.07 | 86.85 ▼15.94 | 39.19 ▼4.53 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.00 ▼0.02 | 39.81 ▲3.79 | 36.23 ▲1.48 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 22.95 ▼0.14 | 645.82 ▼39.45 | 58.26 ▲0.05 |
Media Library /wp-admin/upload.php | 1,400 ▲9 | 4.16 ▼0.02 | 93.06 ▼2.43 | 42.52 ▼3.31 |
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
These items require your attention
- This plugin does not fully uninstall, leaving 8 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- dqfwc_version
- dqfwc_installed
Smoke tests 50% from 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 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/default-quantity-for-woocommerce/vendor/phpcompatibility/php-compatibility/phpunit-bootstrap.php
- 787× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Sniffs\\AbstractVariableSniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php:34
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php:14
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php:16
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php:14
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/Sniffs/Category/SetPropertyAllowedAsDeclaredSniff.php:13
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php:15
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php:16
- > PHP Fatal error
Uncaught Error: Class 'PHPCompatibility\\AbstractFunctionCallParameterSniff' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/ParameterValues/RemovedIconvEncodingSniff.php:32
- > PHP Fatal error
Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: minimum quantity, quantity, woocommerce quantity, default, default quantity
default-quantity-for-woocommerce/default-quantity-for-woocommerce.php Passed 13 tests
The primary PHP file in "Default Quantity for WooCommerce" version 2.0.2 is used by WordPress to initiate all plugin functionality
101 characters long description:
Discover the simplest method to establish default quantities for your WooCommerce store effortlessly.
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
- Do not distribute dangerous files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
- ☣ wp-content/plugins/default-quantity-for-woocommerce/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 970 | 23,422 | 45,572 | 101,525 |
Pascal | 133 | 3,320 | 7,308 | 6,808 |
XML | 184 | 436 | 782 | 6,199 |
Markdown | 10 | 790 | 0 | 3,182 |
JavaScript | 56 | 756 | 859 | 2,089 |
JSON | 8 | 0 | 0 | 716 |
CSS | 33 | 189 | 92 | 665 |
XSD | 1 | 6 | 0 | 130 |
DOS Batch | 2 | 4 | 10 | 10 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please fix the following
- Please reduce cyclomatic complexity of methods to less than 100 (currently 494)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 16.42 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 740.00 |
Average method complexity | 5.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 494.00 |
Code structure | ||
---|---|---|
Namespaces | 197 | |
Interfaces | 3 | |
Traits | 1 | |
Classes | 814 | |
▷ Abstract classes | 20 | 2.46% |
▷ Concrete classes | 794 | 97.54% |
▷ Final classes | 2 | 0.25% |
Methods | 2,589 | |
▷ Static methods | 101 | 3.90% |
▷ Public methods | 2,138 | 82.58% |
▷ Protected methods | 371 | 14.33% |
▷ Private methods | 80 | 3.09% |
Functions | 17 | |
▷ Named functions | 2 | 11.76% |
▷ Anonymous functions | 15 | 88.24% |
Constants | 162 | |
▷ Global constants | 127 | 78.40% |
▷ Class constants | 35 | 21.60% |
▷ Public constants | 35 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin