Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.65ms] Passed 4 tests
This is a short check of server-side resources used by ECT Add to Cart Button
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 37.92 ▼4.36 |
Dashboard /wp-admin | 3.32 ▲0.01 | 52.36 ▲1.92 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 50.08 ▼2.78 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 87.86 ▼5.38 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 42.10 ▲6.00 |
Add New /wp-admin/admin.php?page=add_ect | 3.21 | 34.90 |
ECT Buy Button /wp-admin/admin.php?page=ec | 3.21 | 35.42 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
ECT Add to Cart Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲54 | 14.25 ▼0.02 | 1.76 ▼0.15 | 41.74 ▲0.14 |
Dashboard /wp-admin | 2,224 ▲47 | 5.59 ▼0.08 | 123.50 ▲28.86 | 89.52 ▲47.75 |
Posts /wp-admin/edit.php | 2,126 ▲26 | 2.02 ▲0.00 | 40.72 ▼0.87 | 35.77 ▼3.70 |
Add New Post /wp-admin/post-new.php | 1,562 ▲36 | 23.51 ▲0.16 | 700.96 ▼10.58 | 135.60 ▲75.80 |
Media Library /wp-admin/upload.php | 1,426 ▲23 | 4.10 ▼0.04 | 107.31 ▲5.76 | 74.50 ▲21.26 |
Add New /wp-admin/admin.php?page=add_ect | 909 | 1.89 | 24.33 | 36.78 |
ECT Buy Button /wp-admin/admin.php?page=ec | 848 | 1.99 | 25.82 | 25.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/ect-add-to-cart-button/add_ect_button.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/ect-add-to-cart-button/ect_list.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ect-add-to-cart-button/index.php:10
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Requires at least: Invalid plugin version format
ect-add-to-cart-button/index.php 92% from 13 tests
The entry point to "ECT Add to Cart Button" version 1.4 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 ("ect-add-to-cart-button.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected185 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 2 | 9 | 185 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
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 | 5 | |
▷ Named functions | 5 | 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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/ect28x28.png | 0.63KB | 0.58KB | ▼ 7.59% |
img/delete.png | 0.32KB | 0.20KB | ▼ 36.22% |