Bug #14885

Long Loading Times -- Wordpress Admin Site

Added by Marilyn Weber 7 months ago. Updated 7 months ago.

Priority name:
Category name:
WordPress Plugins
Target version:
Start date:
Due date:
% Done:


Estimated time:


Via ZD:

"The load times for my Wordpress Admin pages are extremely long. It often takes 30-40 seconds to click between pages. The load time for my public facing site seems fine. But the Wordpress Admin pages in particular are having this issue.

Is this problem unique to my site or something others are also experiencing?

Wordpress Admin --- long load times

Public Site – load time fine"


#1 Updated by Marilyn Weber 7 months ago

I do see exactly what he means, and it is not the case on my sites. This seems to be only for this one site - any ideas?

#2 Updated by Raymond Hoh 7 months ago

The lag is caused by the Newsletters Lite plugin.

The main offender is the get_fields() call: The second offender is the check_table() call:

Both calls appear to be some part of an update routine. According to the Query Monitor plugin, the first query runs more than 700 times on a pageload, while the second one runs about 200 times. Together, they cause the roughly 50-60 second load time in the admin area.

I need to do some more debugging to see what Newsletters Lite is doing, but perhaps we can suggest switching this site over to an external newsletter alternative as in #11878. I think we were recommending Tinyletter, but not sure if there is an updated ticket about this.

#3 Updated by Raymond Hoh 7 months ago

I've fixed the issue.

The NewsLetters Lite plugin uses its own object cache to cache its own options:

During the updating_plugin() method, it checks the saved version against the file version before doing its update routine:

When grabbing the saved version, this value was old and not the same as the value in the DB.

So I purged the cached value with wp_cache_delete( 'version', 'newsletters' ) and this fixed the issue!

#4 Updated by Boone Gorges 7 months ago

Nice sleuthing, Ray!

Did you see any obvious reason why there was a mismatch between the cached value and the value in the database? I realize these things are very hard to debug, but perhaps if there's an obvious fix we could suggest upstream, it would be worthwhile.

Is there any way we can detect this kind of problem in the future? It feels odd that the plugin would rely on a cached value during something like an upgrade routine - maybe we could skip it, and force the plugin to fetch directly from the database? Maybe this is a long shot, and maybe it's a case that won't come up again in the future, but it might be worth a bit of investigation.

#5 Updated by Raymond Hoh 7 months ago

It feels odd that the plugin would rely on a cached value during something like an upgrade routine

It's an architectural problem. Their option fetching routine has a cache, so Tribulant needs to purge their cache entry after the upgrade is complete. I took a quick look at their codebase and it looks like they never delete or update any option in their object cache! Crazy!

This means that there could be other issues with the plugin and older, cached values.

I've made a post in their support forum here and Tribulant says they are looking into it.

In the meantime, I can probably patch newsletters-lite so their options object cache is properly updated and deleted when needed.

#6 Updated by Raymond Hoh 7 months ago

  • Category name set to WordPress Plugins
  • Status changed from New to Staged for Production Release
  • Assignee set to Raymond Hoh
  • Target version set to 1.18.21

I've added a fix here:

I've basically removed Tribulant's cache lookup from their custom get_option() method since that method already calls on WP's get_option() function, which has an object cache built-in.

#7 Updated by Marilyn Weber 7 months ago

Thank you! Both from me and the user.

#8 Updated by Boone Gorges 7 months ago

Thanks, Ray!

#9 Updated by Boone Gorges 7 months ago

  • Target version changed from 1.18.21 to 1.18.22

#10 Updated by Raymond Hoh 7 months ago

  • Status changed from Staged for Production Release to Resolved

Looks like Tribulant added my suggestion to the latest version of newsletters-lite, which was deployed as part of today's maintenance release, 1.18.21. See

Going to close this one.

Also available in: Atom PDF