Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼9.58ms] Passed 4 tests
This is a short check of server-side resources used by Add Product To Cart Via URL
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 35.80 ▼5.53 |
Dashboard /wp-admin | 3.31 ▲0.01 | 49.48 ▼22.76 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 42.35 ▼4.29 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 85.64 ▼5.72 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 38.21 ▲5.64 |
Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Add Product To Cart Via URL
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,916 ▲181 | 13.81 ▼0.57 | 6.24 ▲4.54 | 39.95 ▼5.15 |
Dashboard /wp-admin | 2,203 ▲15 | 5.84 ▼0.05 | 97.49 ▼22.82 | 38.18 ▼5.98 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.02 ▲0.01 | 36.09 ▼1.96 | 31.26 ▼5.41 |
Add New Post /wp-admin/post-new.php | 1,533 ▲4 | 23.04 ▲4.58 | 676.89 ▲62.61 | 64.10 ▼0.91 |
Media Library /wp-admin/upload.php | 1,385 ▼6 | 4.13 ▼0.08 | 109.91 ▲15.05 | 46.49 ▲5.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/add-product-to-cart-via-url/woocommerce-add-product-to-cart-via-url.php:15
- > PHP Notice
Undefined variable: template in wp-content/plugins/add-product-to-cart-via-url/templates/productsForm.php on line 2
- > PHP Fatal error
Uncaught Error: Call to a member function get() on null in wp-content/plugins/add-product-to-cart-via-url/templates/productsForm.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 79% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Please add an image for screenshot #2 (Multiple products can be added with this form also.)
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
add-product-to-cart-via-url/woocommerce-add-product-to-cart-via-url.php 69% from 13 tests
"Add Product To Cart Via URL" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 293 characters long)
- Text Domain: The text domain should only use lowercase characters and dashes
- Main file name: It is recommended to name the main PHP file as the plugin slug ("add-product-to-cart-via-url.php" instead of "woocommerce-add-product-to-cart-via-url.php")
- Domain Path: The domain path points to an invalid folder, "/languages" does not exist
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin541 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 72 | 88 | 274 |
JavaScript | 2 | 49 | 24 | 220 |
CSS | 1 | 0 | 0 | 47 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 2.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 1 | 25.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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 were not PNG files found in your plugin