Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.33ms] Passed 4 tests
An overview of server-side resources used by Restriction on Cart
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.01 | 37.91 ▼2.24 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.11 ▼8.83 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 43.80 ▼2.29 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 80.89 ▼7.95 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.22 ▼0.91 |
Restriction on Cart /wp-admin/options-general.php?page=functions | 3.20 | 30.61 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Restriction on Cart
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.19 ▼1.21 | 1.64 ▼0.09 | 41.62 ▼2.01 |
Dashboard /wp-admin | 2,213 ▲25 | 4.88 ▼0.06 | 104.54 ▲1.26 | 40.55 ▼0.02 |
Posts /wp-admin/edit.php | 2,090 ▲1 | 2.02 ▼0.04 | 34.13 ▼4.88 | 31.58 ▲1.29 |
Add New Post /wp-admin/post-new.php | 1,536 ▲3 | 23.30 ▲0.03 | 647.23 ▼24.82 | 53.77 ▼0.05 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.28 ▲0.05 | 93.48 ▼11.89 | 42.04 ▲0.68 |
Restriction on Cart /wp-admin/options-general.php?page=functions | 794 | 2.03 | 23.87 | 25.57 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for 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 | 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
Please fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restriction-on-cart/restriction_on_cart.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 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: cart, max items, max amount, checkout, restriction on cart
restriction-on-cart/restriction_on_cart.php 85% from 13 tests
The entry point to "Restriction on Cart" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("restriction-on-cart.php" instead of "restriction_on_cart.php")
- Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected57 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 18 | 17 | 57 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
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 | 3 | |
▷ Named functions | 3 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin