62% paid-member-subscriptions

Code Review | Paid Membership Subscriptions - Effortless Memberships, Recurring Payments & Content Restriction

WordPress plugin Paid Membership Subscriptions - Effortless Memberships, Recurring Payments & Content Restriction scored62%from 54 tests.

About plugin

  • Plugin page: paid-member-subsc...
  • Plugin version: 2.10.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Nov 27, 2023
  • Number of updates: 325
  • Update frequency: every 9.1 days
  • Top authors: iova.mihai (50.15%)raster02 (27.08%)madalin.ungureanu (22.77%)

Code review

54 tests

User reviews

218 reviews

Install metrics

10,000+ active /1,259,665 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.03MB] [CPU: ▲66.18ms] Passed 4 tests

An overview of server-side resources used by Paid Membership Subscriptions - Effortless Memberships, Recurring Payments & Content Restriction
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.63 ▲2.17113.43 ▲70.67
Dashboard /wp-admin5.29 ▲1.99121.73 ▲68.40
Posts /wp-admin/edit.php5.34 ▲1.99118.35 ▲66.33
Add New Post /wp-admin/post-new.php8.08 ▲2.19156.90 ▲59.33
Media Library /wp-admin/upload.php5.21 ▲1.98110.52 ▲76.44
Export Data /wp-admin/admin.php?page=pms-export-page5.2894.10
Uninstall /wp-admin/admin.php?page=pms-uninstall-page5.1893.96
Settings /wp-admin/admin.php?page=pms-settings-page5.4294.97
Members /wp-admin/admin.php?page=pms-members-page5.36102.49
Basic Information /wp-admin/admin.php?page=pms-basic-info-page5.3586.27
Subscription Plans /wp-admin/edit.php?post_type=pms-subscription5.2893.31
Payments /wp-admin/admin.php?page=pms-payments-page5.25105.17
Discount Codes /wp-admin/edit.php?post_type=pms-discount-codes5.2896.23
Dashboard /wp-admin/admin.php?page=pms-dashboard-page5.23105.55
Reports /wp-admin/admin.php?page=pms-reports-page5.2393.30

Server storage [IO: ▲8.85MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 772 new files
Database: 4 new tables, 15 new options
New tables
wp_pms_member_subscriptionmeta
wp_pms_paymentmeta
wp_pms_payments
wp_pms_member_subscriptions
New WordPress options
pms_version
db_upgraded
pms_review_request_status
pms_content_restriction_settings
pms_emails_settings
pms_general_settings
pms_woocommerce_settings
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Paid Membership Subscriptions - Effortless Memberships, Recurring Payments & Content Restriction
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,378 ▲61616.73 ▲2.39174.74 ▲172.7643.62 ▲0.55
Dashboard /wp-admin2,575 ▲3955.75 ▲0.1199.13 ▲0.4091.65 ▲46.71
Posts /wp-admin/edit.php2,351 ▲2482.34 ▲0.4037.74 ▼3.2136.18 ▼0.77
Add New Post /wp-admin/post-new.php1,963 ▲43722.10 ▼1.03631.25 ▼0.6635.63 ▼18.65
Media Library /wp-admin/upload.php1,732 ▲3354.34 ▲0.15106.15 ▲6.2182.18 ▲40.02
Export Data /wp-admin/admin.php?page=pms-export-page1,5512.1039.9537.55
Uninstall /wp-admin/admin.php?page=pms-uninstall-page1,1231.9635.5321.55
Settings /wp-admin/admin.php?page=pms-settings-page1,6952.1940.0264.02
Members /wp-admin/admin.php?page=pms-members-page1,6462.4040.4240.92
Basic Information /wp-admin/admin.php?page=pms-basic-info-page1,9621.7027.7266.07
Subscription Plans /wp-admin/edit.php?post_type=pms-subscription1,5272.4340.6039.32
Payments /wp-admin/admin.php?page=pms-payments-page1,4812.1134.3436.29
Discount Codes /wp-admin/edit.php?post_type=pms-discount-codes1,4692.4640.4336.89
Dashboard /wp-admin/admin.php?page=pms-dashboard-page1,4411.8830.6035.10
Reports /wp-admin/admin.php?page=pms-reports-page1,3004.3992.8935.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_pms_member_subscriptions
    • wp_pms_paymentmeta
    • wp_pms_member_subscriptionmeta
    • wp_pms_payments
  • The uninstall procedure has failed, leaving 15 options in the database
    • pms_review_request_status
    • pms_add_ons_settings
    • pms_version
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • pms_general_settings
    • widget_recent-comments
    • theysaidso_admin_options
    • pms_payments_home_url
    • ...

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
Good news, no errors were detected

SRP 50% 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
  • 322× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/paid-member-subscriptions/includes/modules/labels-edit/assets/lib/wck-api/fields/text.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/paid-member-subscriptions/i18n/states/HK.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/CouponService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/TestHelpers/TestHelpersServiceFactory.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/Sigma/ScheduledQueryRunService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/AccountLinkService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/Identity/VerificationReportService.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\HttpClient\\ClientInterface' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/HttpClient/CurlClient.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/Service/Radar/ValueListService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/lib/EphemeralKey.php:15

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

paid-member-subscriptions/index.php 85% from 13 tests

The primary PHP file in "Paid Membership Subscriptions - Effortless Memberships, Recurring Payments & Content Restriction" version 2.10.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paid-member-subscriptions.php" instead of "index.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.1" instead of "3.0.0")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/paid-member-subscriptions/assets/libs/stripe/data/ca-certificates.crt
84,644 lines of code in 631 files:
LanguageFilesBlank linesComment linesLines of code
PHP53616,60923,48646,354
PO File411,43117,82826,924
CSS221,1803216,368
JavaScript431,7831,1424,350
SVG1601341
JSON600224
Sass33058
XML1121125

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.31
▷ Minimum class complexity1.00
▷ Maximum class complexity424.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces34
Interfaces9
Traits9
Classes354
▷ Abstract classes102.82%
▷ Concrete classes34497.18%
▷ Final classes00.00%
Methods1,730
▷ Static methods29517.05%
▷ Public methods1,54789.42%
▷ Protected methods834.80%
▷ Private methods1005.78%
Functions580
▷ Named functions49585.34%
▷ Anonymous functions8514.66%
Constants1,060
▷ Global constants434.06%
▷ Class constants1,01795.94%
▷ Public constants1,017100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
92 PNG files occupy 0.60MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pms-add-on-pro-rate-banner_icon.png17.75KB3.71KB▼ 79.07%
assets/images/add-on-email-reminders.png2.64KB2.64KB0.00%
(invalid) assets/images/navigation_menu_filtering_icon.png1.04KB0.00KB▼ 100.00%
assets/images/pms-add-on-pwyw-logo.png5.69KB3.14KB▼ 44.89%
assets/images/add-on-paypal-recurring.png5.13KB5.21KB0.00%