Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼9.01ms] Passed 4 tests
Server-side resources used by NS Custom Add To Cart Button For Woocommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 38.11 ▼3.93 |
Dashboard /wp-admin | 3.33 ▼0.02 | 47.78 ▼13.81 |
Posts /wp-admin/edit.php | 3.44 ▲0.09 | 51.90 ▼1.34 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 91.67 ▼14.39 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 36.23 ▼3.91 |
Custom Add to Cart /wp-admin/admin.php?page=ns-custom-add-to-cart-button-for-woocoomerce/ns-admin-options/ns_admin_option_dashboard.php | 3.25 | 33.43 |
/wp-admin/admin.php?page=plugineye237 | 3.22 | 35.04 |
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version | 3.20 | 32.65 |
Server storage [IO: ▲0.34MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for NS Custom Add To Cart Button For Woocommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲73 | 14.72 ▼0.04 | 1.87 ▼0.33 | 44.26 ▼2.24 |
Dashboard /wp-admin | 2,210 ▲33 | 5.67 ▼0.02 | 86.34 ▼1.81 | 80.70 ▲38.55 |
Posts /wp-admin/edit.php | 2,133 ▲33 | 2.01 ▲0.03 | 38.02 ▼3.12 | 34.25 ▼2.35 |
Add New Post /wp-admin/post-new.php | 1,706 ▲157 | 22.58 ▼0.61 | 735.15 ▲57.01 | 52.06 ▼8.94 |
Media Library /wp-admin/upload.php | 1,430 ▲30 | 4.16 ▼0.06 | 106.93 ▲7.94 | 77.91 ▲31.87 |
Custom Add to Cart /wp-admin/admin.php?page=ns-custom-add-to-cart-button-for-woocoomerce/ns-admin-options/ns_admin_option_dashboard.php | 913 | 2.01 | 22.50 | 30.36 |
/wp-admin/admin.php?page=plugineye237 | 921 | 2.03 | 24.19 | 24.77 |
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version | 691 | 1.53 | 6.52 | 20.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=how-to-install-premium-version
- > Warning in wp-includes/pluggable.php+1438
Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
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× 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/ns-custom-add-to-cart-button-for-woocoomerce/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% 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:
- Tags: You are using too many tags: 13 tag instead of maximum 10
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings Custom Add to Cart.), #2 (View single product example.), #3 (View shop page example.)
ns-custom-add-to-cart-button-for-woocoomerce/ns-change-addcart.php 92% from 13 tests
The main PHP file in "NS Custom Add To Cart Button For Woocommerce" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ns-custom-add-to-cart-button-for-woocoomerce.php" instead of "ns-change-addcart.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
Everything looks great! No dangerous files found in this plugin855 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 73 | 177 | 551 |
CSS | 3 | 22 | 8 | 276 |
JavaScript | 1 | 4 | 0 | 28 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 20.00 |
▷ Minimum class complexity | 20.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 19 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 26.32% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 14 | 73.68% |
Functions | 17 | |
▷ Named functions | 7 | 41.18% |
▷ Anonymous functions | 10 | 58.82% |
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
6 PNG files occupy 0.30MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 108.35KB | 43.05KB | ▼ 60.26% |
ns-admin-options/img/backend-sidebar-icon.png | 1.48KB | 0.54KB | ▼ 63.47% |
screenshot-1.png | 26.60KB | 6.68KB | ▼ 74.90% |
screenshot-3.png | 117.97KB | 48.78KB | ▼ 58.65% |
ns-admin-options/img/ns-theme-promo.png | 29.37KB | 8.96KB | ▼ 69.50% |