• We are investigating performance bottlenecks on our site. I am seeing a ton of external web calls from this plugin to “promo-dashboard.stylemixthemes.com”. Averaging a little over 1 call every 2 minutes.

    I’m not sure we really want this plugin phoning home to begin with. But even setting that conversation aside this is really excessive and it is hurting the performance of our web server.

    Is there a way that we can disable this behavior in this plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support James StylemixThemes

    (@jamesstylemixthemes)

    Hi @mattkeys,

    Thank you for reaching out!

    The plugin sends only one request per day to the server to save data in the database. This process is lightweight and won’t consume significant resources, so there’s no need to worry.

    Best regards

    Thread Starter Matt Keys

    (@mattkeys)

    hi James, can you reread my original post and look at the screenshot I attached? I agree if this was happening once a day it wouldn’t be much of a problem but that’s not what is happening.

    Thread Starter Matt Keys

    (@mattkeys)

    I’ve been able to identify the bug causing this issue.

    /wp-content/plugins/cost-calculator-builder/includes/lib/admin-notifications-popup/classes/ApiNotifications.php Line #26.

    if ( false === $transient_data || get_option('_transient_timeout_' . $transient_name ) < current_time( 'timestamp' ) ) {

    This looks innocent enough but if you know how WordPress handles transients it explains why this bug is coming up.

    By default transients are stored in the database like a WordPress option. And in that case this code will work totally fine.

    However once you enable object caching (which many hosting providers do for performance reasons), transients are no longer stored in the database. They are stored in memory with memcache.

    And it is in that situation that the code above will always execute, because the call to get_option('transient_timeout' . $transient_name ) < current_time( 'timestamp' ) will ALWAYS evaluate as TRUE because that option does not exist. It doesn’t exist because with object caching/memcache, the transient is in memory, not in the options table in the DB.

    And because it is always true, on every single page load in the admin area, it will phone home to promo-dashboard.stylemixthemes.com. This is why our server is getting hammered with these calls.

    The solution is easy. The transient API takes care of expiring transients on its own, you do not need to check it yourself in the code. So the line I referenced should just read:

    if ( false === $transient_data ) {

    I will manually apply this fix to our servers to resolve this issue until it can hopefully be patched in the next version of this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.