• The plugin has a lot of features, really powerful! And can be used to created extensive permission based memberships. Great.

    BUT: The performance is just awful. Thanks god I’m a tec expert who can tweak the plugin, remove hooks etc to improve it’s performance. Be aware that it makes so many unnecessary queries, you should better have a very good server if you have a lot of users!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jason Coleman

    (@strangerstudios)

    Hi there. Thanks for checking out PMPro.

    This is a complicated plugin that does a lot of things and so does have an outsized impact on the performance of a site.

    Those who are interested can see our hosting suggestions here: https://www.paidmembershipspro.com/documentation/compatibility/hosting/

    And our caching suggestions here: https://www.paidmembershipspro.com/documentation/advanced/caching/

    That said, we don’t want to waste your server resources if we don’t have to. I’d be curious to know what hooks you are removing and what other tweaks you are doing to increase performance. We can perhaps incorporate that into the plugin or at least make that easier for non-technical users to do.

    We are always working on making the plugin better, including performance. You can get involved in development at our GitHub repo. This is open source software. We make all of it available for free, and appreciate all the help we can get.

    Finally, I don’t want to imply that 1 star is the incorrect choice for your review, I’m a fan of honest reviews of our plugin, but if you feel like reconsidering, it means a lot to us that our reviews accurately reflect the state of the plugin. For example, note that it takes 7 5-star reviews to balance each 1-star review if we want to keep a 4.5 average. Maybe we don’t deserve 4.5. Maybe we don’t deserve 1-star. Think about it.

    Good luck with your sites.

    Thread Starter sx1001

    (@sx1001)

    Hi Jason,

    thanks for the reply.

    Sorry, but I cannot get involved – we paid for the plugin, as we did for several others – just to find out I need to start optimizing it.

    I’ll give you a small idea what I’m talking about:

    1. On every page load about 10-15 get_option calls which hit the DB because the result is sometimes empty and hence will not get cached by WP Object

    2. Updating the different page_views, by user, by week, alone this has 3 update statements on every pageload.. I removed those via custom functions:
    remove_action(“wp”, “pmpro_report_login_wp_visits”);
    remove_action(“wp_head”, “pmpro_report_login_wp_views”);
    remove_action(“wp_login”, “pmpro_report_login_wp_login”, 10 ,2);

    3. pmpro_is_ready():

    // check if there is at least one level
    	$pmpro_level_ready = (bool) $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels LIMIT 1" );
    
    	// check if the gateway settings are good. first check if it's needed (is there paid membership level)
    	$paid_membership_level = $wpdb->get_var( "SELECT id FROM $wpdb->pmpro_membership_levels WHERE allow_signups = 1 AND (initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0) LIMIT 1" );
    	$paid_user_subscription = $wpdb->get_var( "SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE initial_payment > 0 OR billing_amount > 0 OR trial_amount > 0 LIMIT 1" );

    If one sets up the plugin and configures it – why have 3 queries on EVERY damn page load? If it’s really required, just update ONE flag in the DB which indicates which readiness the plugin has. But not 3 queries in the frontend on every pageload.

    4. There are dozens of functions done like pmpro_affiliates_checkdb() (which is an plus-addon=) which perform several queries, like SHOW TABLE, dbDelta, etc on EVERY pageload instead of just ONCE when updating / installing it

    5. For a lot of things, there’s no use of WP Object at all. E.g. getting categories, reading the membership levels etc – it’s basically a “one time setup” and often, you dont change it anymore. We use W3 TC but nothing of this is cached at all in memcache.

    6. There are quirks and bugs here and there, e.g. the filter pmpro_bp_bp_get_add_friend_button. A guest cannot even “delete” a friendship, e.g. unfriending?

    /**
     * Fix PMPro issue with restrictions: Unfriend button disappearing for guests
     */
    if(function_exists('pmpro_bp_user_can')) {
        remove_filter('bp_get_add_friend_button', 'pmpro_bp_bp_get_add_friend_button' );
    }

    7. This action is a joke:
    add_action(‘init’, ‘pmpro_bp_directory_init’, 20);

    pmpro_bp_directory_init usees a SUPER expensive function pmpro_bp_get_members_in_directory(). getting ALL levels. Than ONE BY ONE in a loop getting the level options. It’s just crazy.

    And I have dozens of findings more.
    I’m willing to contribute, you can engage my freelancing which makes your plugin useable on a 10k+ users membership page.

    Thread Starter sx1001

    (@sx1001)

    EDIT: Yes I know, pmpro_affiliates_checkdb() only acts no the admin_init.
    Still.. if every plugin developers thinks like this adding 1-5 queries per plugin, one can potentially end up running 100 – 200 (80% of them useless or improvable) queries PER ADMIN PAGELOAD.

    Oof. This is disconcerting. Thinking about using this plugin till I read this.

    Plugin Author Jason Coleman

    (@strangerstudios)

    @ironlion, I don’t know if you are still looking into membership plugins. Performance issues are important. It might help you feel better to know that all of these issues @sx1001 pointed out are on our radar and being addressed. It’s slow work to update these things.

    100-100 queries seems standard to me for transactional WordPress sites. You would get similar numbers running WooCommerce or other membership plugins. You can easily find hosting that supports it well. Page caching helps. We have docs on how to set that up on our site.

    If one is very concerned with performance, you can possible get by without even using a plugin at all. https://www.paidmembershipspro.com/you-do-not-need-membership-plugin/

    Good luck with your sites.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Awfully bad performance’ is closed to new replies.