Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲7.11MB] [CPU: ▲67.31ms] 50% from 4 tests
An overview of server-side resources used by Membership Plugin - Restrict Content
The following require your attention
- RAM: You should keep total memory usage under 10MB (currently 10.95MB on /wp-admin/admin.php?page=restrict-content-welcome)
- Extra RAM: The extra memory usage should kept under 5MB (currently 7.11MB on /wp-admin/admin.php?page=restrict-content-welcome)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.10 ▲5.64 | 91.31 ▲52.21 |
Dashboard /wp-admin | 10.97 ▲7.63 | 202.99 ▲142.32 |
Posts /wp-admin/edit.php | 10.95 ▲7.59 | 121.17 ▲73.81 |
Add New Post /wp-admin/post-new.php | 13.45 ▲7.56 | 158.60 ▲67.06 |
Media Library /wp-admin/upload.php | 10.95 ▲7.72 | 112.03 ▲76.17 |
Memberships /wp-admin/admin.php?page=rcp-members | 10.95 | 103.77 |
Payments /wp-admin/admin.php?page=rcp-payments | 10.95 | 124.04 |
Customers /wp-admin/admin.php?page=rcp-customers | 10.95 | 95.62 |
Membership Levels /wp-admin/admin.php?page=rcp-member-levels | 10.95 | 102.47 |
Restrict Access /wp-admin/edit.php?post_type=page&page=rcp-restrict-post-type-page | 10.95 | 92.60 |
Settings /wp-admin/admin.php?page=rcp-settings | 10.95 | 98.63 |
Subscription Reminder /wp-admin/admin.php?page=rcp-reminder | 10.95 | 106.15 |
Restrict Access /wp-admin/edit.php?page=rcp-restrict-post-type | 10.95 | 97.28 |
Help /wp-admin/admin.php?page=rcp-need-help | 10.95 | 93.14 |
RCP Welcome /wp-admin/admin.php?page=restrict-content-welcome | 10.95 | 103.96 |
Server storage [IO: ▲12.06MB] [DB: ▲0.02MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 902 new files
Database: 11 new tables, 26 new options
New tables |
---|
wp_rcp_discounts |
wp_rcp_subscription_level_meta |
wp_rcp_membershipmeta |
wp_rcp_queue |
wp_rcp_payment_meta |
wp_restrict_content_pro |
wp_rcp_logs |
wp_rcp_memberships |
wp_rcp_membership_counts |
wp_rcp_customers |
... |
New WordPress options |
---|
wpdb_restrict_content_pro_version |
restrict_content_chosen_version |
rcp_db_version |
rcp_is_installed |
wpdb_rcp_memberships_version |
rcp_payments_db_version |
stellarwp_telemetry_restrict-content_show_optin |
can_compress_scripts |
rcp_version |
wpdb_rcp_logs_version |
... |
Browser metrics Passed 4 tests
Membership Plugin - Restrict Content: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,892 ▲145 | 14.33 ▲0.20 | 1.84 ▲0.31 | 38.74 ▲1.02 |
Dashboard /wp-admin | 2,291 ▲110 | 5.66 ▼0.04 | 99.62 ▼4.36 | 45.38 ▲5.97 |
Posts /wp-admin/edit.php | 2,200 ▲103 | 2.04 ▲0.05 | 41.60 ▲4.99 | 40.49 ▲4.27 |
Add New Post /wp-admin/post-new.php | 2,018 ▲492 | 20.40 ▼2.72 | 637.21 ▼75.47 | 37.31 ▼21.32 |
Media Library /wp-admin/upload.php | 1,499 ▲102 | 4.19 ▲0.02 | 100.45 ▲1.76 | 43.22 ▲0.12 |
Memberships /wp-admin/admin.php?page=rcp-members | 1,401 | 2.03 | 37.05 | 54.92 |
Payments /wp-admin/admin.php?page=rcp-payments | 1,398 | 2.20 | 37.29 | 38.26 |
Customers /wp-admin/admin.php?page=rcp-customers | 1,328 | 8.68 | 93.28 | 39.70 |
Membership Levels /wp-admin/admin.php?page=rcp-member-levels | 1,762 | 2.40 | 39.23 | 42.95 |
Restrict Access /wp-admin/edit.php?post_type=page&page=rcp-restrict-post-type-page | 1,143 | 2.33 | 34.61 | 28.78 |
Settings /wp-admin/admin.php?page=rcp-settings | 4,132 | 7.83 | 179.37 | 150.35 |
Subscription Reminder /wp-admin/admin.php?page=rcp-reminder | 1,934 | 6.66 | 138.45 | 56.82 |
Restrict Access /wp-admin/edit.php?page=rcp-restrict-post-type | 1,143 | 2.21 | 33.15 | 30.39 |
Help /wp-admin/admin.php?page=rcp-need-help | 1,278 | 2.13 | 31.64 | 51.07 |
RCP Welcome /wp-admin/admin.php?page=restrict-content-welcome | 1,115 | 2.27 | 28.54 | 47.88 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie tables detected upon uninstall: 11 tables
- wp_rcp_queue
- wp_rcp_logs
- wp_rcp_payments
- wp_rcp_membershipmeta
- wp_rcp_payment_meta
- wp_restrict_content_pro
- wp_rcp_membership_counts
- wp_rcp_customers
- wp_rcp_discounts
- wp_rcp_memberships
- ...
- This plugin did not uninstall successfully, leaving 26 options in the database
- rcp_reminder_notices
- wpdb_rcp_membershipmeta_version
- rcp_install_pages_created
- stellarwp_telemetry
- can_compress_scripts
- rcp_db_version
- db_upgraded
- widget_recent-posts
- wpdb_rcp_queue_version
- rcp_version
- ...
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=page&page=rcp-restrict-post-type-page
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
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
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/restrict-content/core/includes/libraries/stripe/build.php
- > /wp-content/plugins/restrict-content/core/includes/libraries/stripe/update_certs.php
- 360× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Topup.php:32
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restrict-content/core/includes/redirects.php:74
- > PHP Fatal error
Uncaught Error: Class 'RCP\\StellarWP\\Telemetry\\Contracts\\Abstract_Subscriber' not found in wp-content/plugins/restrict-content/vendor/strauss/stellarwp/telemetry/src/Telemetry/Admin/Admin_Subscriber.php:26
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Service/Issuing/IssuingServiceFactory.php:16
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Service/Apps/SecretService.php:7
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Treasury/ReceivedCredit.php:30
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Service/ProductService.php:7
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/restrict-content/core/includes/libraries/stripe/lib/Service/Radar/RadarServiceFactory.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restrict-content/legacy/includes/scripts.php:44
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/restrict-content/vendor/strauss/lucatume/di52/src/ContainerException.php:24
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=restrict-content-welcome
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'hasAttribute')" "TypeError: Cannot read properties of undefined (reading 'hasAttribute')\n at determineDelay (/wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.39:230:36)\n at /wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.39:12:21\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.39:262:6)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=restrict-content-welcome
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'hasAttribute')
Optimizations
Plugin configuration 80% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
- Screenshots: These screenshots lack descriptions #1, #2, #3 in restrict-content/assets to your readme.txt
restrict-content/restrictcontent.php 62% from 13 tests
The primary PHP file in "Membership Plugin - Restrict Content" version 3.2.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)
- Domain Path: Prefix the domain path with a forward slash character ("/languages")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("restrict-content.php" instead of "restrictcontent.php")
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
These items require your attention
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/restrict-content/core/includes/libraries/stripe/data/ca-certificates.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 17 | 28,431 | 46,774 | 82,884 |
PHP | 538 | 14,934 | 38,223 | 47,778 |
JavaScript | 38 | 1,084 | 1,298 | 5,300 |
CSS | 19 | 644 | 135 | 3,858 |
Markdown | 4 | 793 | 0 | 1,530 |
SVG | 37 | 0 | 0 | 305 |
JSON | 4 | 0 | 0 | 243 |
Sass | 2 | 15 | 0 | 54 |
XML | 1 | 0 | 0 | 31 |
make | 1 | 10 | 0 | 29 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 8.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 347.00 |
Average method complexity | 2.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 72.00 |
Code structure | ||
---|---|---|
Namespaces | 58 | |
Interfaces | 20 | |
Traits | 9 | |
Classes | 372 | |
▷ Abstract classes | 18 | 4.84% |
▷ Concrete classes | 354 | 95.16% |
▷ Final classes | 13 | 3.67% |
Methods | 2,028 | |
▷ Static methods | 244 | 12.03% |
▷ Public methods | 1,669 | 82.30% |
▷ Protected methods | 154 | 7.59% |
▷ Private methods | 205 | 10.11% |
Functions | 736 | |
▷ Named functions | 705 | 95.79% |
▷ Anonymous functions | 31 | 4.21% |
Constants | 1,037 | |
▷ Global constants | 15 | 1.45% |
▷ Class constants | 1,022 | 98.55% |
▷ Public constants | 1,018 | 99.61% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.94MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
core/includes/images/ui-icons_2e83ff_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
core/includes/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.10KB | 0.17KB | 0.00% |
core/includes/images/Group-Account-addon.png | 10.79KB | 3.86KB | ▼ 64.20% |
core/includes/css/images/ui-icons_cd0a0a_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
core/includes/images/ui-bg_flat_0_aaaaaa_40x100.png | 0.18KB | 0.08KB | ▼ 51.67% |