Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼8.14ms] Passed 4 tests
A check of server-side resources used by WooCommerce Cart Stock Reducer
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.29 ▼3.28 |
Dashboard /wp-admin | 3.31 ▼0.03 | 45.47 ▼13.04 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 42.75 ▼5.92 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 80.60 ▼10.33 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 33.21 ▼1.44 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
WooCommerce Cart Stock Reducer: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.71 ▼0.65 | 1.94 ▼0.03 | 43.03 ▲0.89 |
Dashboard /wp-admin | 2,206 ▲18 | 5.82 ▼0.07 | 104.65 ▼10.94 | 38.28 ▼8.13 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.00 ▼0.01 | 33.98 ▼3.24 | 32.49 ▲1.70 |
Add New Post /wp-admin/post-new.php | 1,533 ▼0 | 23.06 ▼0.28 | 678.82 ▼17.05 | 61.54 ▼6.07 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.21 ▲0.02 | 93.38 ▼7.46 | 41.10 ▼5.23 |
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 did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- widget_recent-comments
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 50% from 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
Almost there! Just fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/woocommerce-cart-stock-reducer/tests/test-sample.php:11
- > PHP Fatal error
Uncaught Error: Class 'WC_Unit_Test_Case' not found in wp-content/plugins/woocommerce-cart-stock-reducer/tests/test-woocommerce.php:11
- > PHP Fatal error
Uncaught Exception: Could not find /tmp/wordpress-tests-lib/includes/functions.php, have you run bin/install-wp-tests.sh ? in wp-content/plugins/woocommerce-cart-stock-reducer/tests/bootstrap.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: cart, woocommerce, stock, countdown, expire
woocommerce-cart-stock-reducer/woocommerce-cart-stock-reducer.php Passed 13 tests
The main PHP script in "WooCommerce Cart Stock Reducer" version 3.90 is automatically included on every request by WordPress
107 characters long description:
Allow WooCommerce inventory stock to be reduced when adding items to cart and/or expire items from the cart
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,268 lines of code in 76 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 58 | 77 | 659 | 1,542 |
PHP | 8 | 227 | 434 | 1,232 |
Markdown | 1 | 53 | 0 | 162 |
Bourne Shell | 1 | 21 | 11 | 120 |
CSS | 2 | 2 | 1 | 68 |
YAML | 1 | 7 | 0 | 62 |
HTML | 1 | 0 | 0 | 36 |
XML | 3 | 5 | 2 | 34 |
JSON | 1 | 0 | 0 | 12 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 54.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 216.00 |
Average method complexity | 4.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 73 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 66 | 90.41% |
▷ Protected methods | 4 | 5.48% |
▷ Private methods | 3 | 4.11% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/js/jquery-countdown/img/countdownLED.png | 0.33KB | 0.27KB | ▼ 18.88% |