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.17MB] [CPU: ▼9.10ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Custom Add To Cart Button
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.66 ▲0.20 | 48.48 ▼1.20 |
Dashboard /wp-admin | 3.50 ▲0.20 | 59.51 ▲1.33 |
Posts /wp-admin/edit.php | 3.55 ▲0.20 | 54.70 ▼5.68 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.13 | 88.73 ▼20.79 |
Media Library /wp-admin/upload.php | 3.36 ▲0.13 | 43.96 ▼8.72 |
Server storage [IO: ▲0.65MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce Custom Add To Cart Button
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.30 ▼0.44 | 2.17 ▲0.37 | 48.93 ▲4.25 |
Dashboard /wp-admin | 2,192 ▲24 | 5.53 ▼0.01 | 95.57 ▼1.19 | 40.50 ▼2.04 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 2.05 ▼0.00 | 42.10 ▼2.65 | 32.59 ▼10.19 |
Add New Post /wp-admin/post-new.php | 1,545 ▼0 | 23.20 ▲0.34 | 708.03 ▲32.36 | 53.02 ▼3.47 |
Media Library /wp-admin/upload.php | 1,403 ▲9 | 4.25 ▲0.10 | 115.98 ▼45.86 | 48.35 ▼23.17 |
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
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Interface 'Barn2\\WCB_Lib\\Registerable' not found in wp-content/plugins/woo-custom-add-to-cart-button/src/Add_To_Cart_Styles.php:14
- > PHP Fatal error
Uncaught Error: Interface 'Barn2\\WCB_Lib\\Registerable' not found in wp-content/plugins/woo-custom-add-to-cart-button/src/Add_To_Cart_Replacer.php:14
- > PHP Fatal error
Uncaught Error: Interface 'Barn2\\WCB_Lib\\Registerable' not found in wp-content/plugins/woo-custom-add-to-cart-button/lib/Plugin/Admin/Admin_Links.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Barn2\\WCB_Lib\\Plugin\\Plugin' not found in wp-content/plugins/woo-custom-add-to-cart-button/lib/Plugin/Simple_Plugin.php:17
- > PHP Fatal error
Uncaught Error: Interface 'Barn2\\WCB_Lib\\Registerable' not found in wp-content/plugins/woo-custom-add-to-cart-button/src/Admin/Add_To_Cart_Customizer.php:15
- > PHP Fatal error
Uncaught Error: Class 'Barn2\\WCB_Lib\\Plugin\\Simple_Plugin' not found in wp-content/plugins/woo-custom-add-to-cart-button/src/Plugin.php:21
- > 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 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: button, cart, woocommerce
woo-custom-add-to-cart-button/woo-custom-add-to-cart-button.php 85% from 13 tests
The main PHP script in "WooCommerce Custom Add To Cart Button" version 1.2.2 is automatically included on every request by WordPress
You should first fix the following items:
- Requires at least: Required version must match the one declared in readme.txt ("5.2" instead of "3.7")
- Git Repository: There should be no Git repositories present in your plugin
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
Good job! No executable or dangerous file extensions detected4,261 lines of code in 34 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 4 | 0 | 0 | 3,144 |
PHP | 24 | 249 | 484 | 934 |
Sass | 1 | 12 | 1 | 62 |
CSS | 2 | 4 | 63 | 52 |
JavaScript | 1 | 6 | 0 | 37 |
YAML | 2 | 0 | 0 | 32 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 6.68 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 6 | |
Traits | 1 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 104 | |
▷ Static methods | 23 | 22.12% |
▷ Public methods | 101 | 97.12% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 2.88% |
Functions | 5 | |
▷ Named functions | 2 | 40.00% |
▷ Anonymous functions | 3 | 60.00% |
Constants | 11 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 11 | 100.00% |
▷ Public constants | 11 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
.wordpress-org/icon-256x256.png | 8.48KB | 3.99KB | ▼ 52.98% |
.wordpress-org/banner-772x250.png | 30.34KB | 12.12KB | ▼ 60.06% |
.wordpress-org/icon-128x128.png | 4.18KB | 2.22KB | ▼ 46.89% |
.wordpress-org/banner-1544x500.png | 52.64KB | 21.58KB | ▼ 59.00% |