Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼11.26ms] Passed 4 tests
An overview of server-side resources used by Membership For WooCommerce - Add Simple Membership Plans, Recurring Revenue, Product Tags & Send Emails To Members with WooCommerce Membership
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 38.80 ▼4.73 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.75 ▼22.19 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.78 ▼1.90 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 92.43 ▼16.20 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.19 ▲0.82 |
Server storage [IO: ▲10.53MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 205 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Membership For WooCommerce - Add Simple Membership Plans, Recurring Revenue, Product Tags & Send Emails To Members with WooCommerce Membership: 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,789 ▲28 | 14.37 ▼0.28 | 1.82 ▲0.16 | 42.95 ▼2.43 |
Dashboard /wp-admin | 2,198 ▲18 | 5.58 ▼0.03 | 90.30 ▲3.45 | 39.96 ▼4.34 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.03 | 38.77 ▲1.69 | 35.89 ▲0.74 |
Add New Post /wp-admin/post-new.php | 1,526 ▼8 | 23.17 ▲5.02 | 699.28 ▲83.50 | 60.89 ▼11.80 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.15 ▼0.07 | 96.12 ▼10.49 | 44.14 ▼1.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/membership-for-woocommerce/public/partials/membership-for-woocommerce-public-display.php
- > /wp-content/plugins/membership-for-woocommerce/common/partials/membership-for-woocommerce-common-display.php
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/membership-for-woocommerce/onboarding/templates/membership-for-woocommerce-onboarding-template.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/membership-for-woocommerce/admin/partials/templates/membership-templates/wps-membership-template.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/membership-for-woocommerce/admin/partials/templates/membership-templates/wps-membership-overview.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/membership-for-woocommerce/public/partials/templates/membership-templates/wps-membership-template.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/membership-for-woocommerce/index.php:14
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/membership-for-woocommerce/admin/classes/class-wps-membership-free-shipping-method.php:21
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/membership-for-woocommerce/public/classes/class-wps-membership-free-shipping-method.php:21
- > 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 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
These attributes need to be fixed:
- Requires php: Invalid version format
membership-for-woocommerce/membership-for-woocommerce.php 92% from 13 tests
The main PHP script in "Membership For WooCommerce - Add Simple Membership Plans, Recurring Revenue, Product Tags & Send Emails To Members with WooCommerce Membership" version 2.3.3 is automatically included on every request by WordPress
The following require your attention:
- Description: The description should be shorter than 140 characters (currently 384 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin57,253 lines of code in 120 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 24 | 10,518 | 12,938 | 34,668 |
PHP | 52 | 3,586 | 3,621 | 12,654 |
CSS | 22 | 1,050 | 288 | 7,528 |
PO File | 1 | 580 | 813 | 1,263 |
Sass | 1 | 181 | 0 | 805 |
JSON | 3 | 0 | 0 | 202 |
Markdown | 3 | 76 | 0 | 83 |
SVG | 13 | 0 | 0 | 44 |
XML | 1 | 2 | 0 | 6 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 125.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 725.00 |
Average method complexity | 8.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 113.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 260 | |
▷ Static methods | 9 | 3.46% |
▷ Public methods | 248 | 95.38% |
▷ Protected methods | 3 | 1.15% |
▷ Private methods | 9 | 3.46% |
Functions | 38 | |
▷ Named functions | 36 | 94.74% |
▷ Anonymous functions | 2 | 5.26% |
Constants | 4 | |
▷ Global constants | 4 | 100.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
52 compressed PNG files occupy 0.97MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/resources/icons/banner.png | 332.71KB | 151.58KB | ▼ 54.44% |
admin/image/Variable-product.png | 2.46KB | 2.45KB | 0.20% |
admin/resources/icons/2.png | 8.43KB | 8.03KB | ▼ 4.81% |
admin/image/star.png | 2.62KB | 2.67KB | 0.00% |
admin/image/email-icon.png | 2.29KB | 2.03KB | ▼ 11.48% |