Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.74ms] Passed 4 tests
An overview of server-side resources used by WooCommerce - Allow Only One Item in Cart
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 39.47 ▼4.19 |
Dashboard /wp-admin | 3.31 ▲0.01 | 46.72 ▼4.42 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 53.83 ▲6.65 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 92.39 ▼8.40 |
Media Library /wp-admin/upload.php | 3.24 ▲0.00 | 33.21 ▼5.96 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
WooCommerce - Allow Only One Item in Cart: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 13.31 ▼1.07 | 1.80 ▲0.07 | 40.66 ▼1.63 |
Dashboard /wp-admin | 2,206 ▲21 | 5.85 ▼0.05 | 107.85 ▼7.59 | 45.12 ▼0.94 |
Posts /wp-admin/edit.php | 2,092 ▲21 | 2.04 ▲0.02 | 53.27 ▲17.77 | 47.80 ▲15.98 |
Add New Post /wp-admin/post-new.php | 1,533 ▼10 | 23.16 ▲5.19 | 637.43 ▼9.79 | 53.27 ▲1.56 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.18 ▲0.00 | 94.47 ▼15.99 | 41.73 ▼7.63 |
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
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-allow-only-one-item-in-cart/woo-allow-only-one-item-in-cart.php:12
- > PHP Fatal error
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 Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: cart, woocommerce, item
woo-allow-only-one-item-in-cart/woo-allow-only-one-item-in-cart.php Passed 13 tests
The entry point to "WooCommerce - Allow Only One Item in Cart" version 1.0.0 is a PHP file that has certain tags in its header comment area
57 characters long description:
Removes all items from cart before another item is added.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected11 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 3 | 9 | 11 |
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 code | 0.00 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin