Home › Forums › Newsletter Plugin Support › Newsletter plugin slowing down wp-admin
- This topic has 10 replies, 2 voices, and was last updated 3 days, 1 hour ago by
Stefano.
-
AuthorPosts
-
April 13, 2025 at 5:55 am #342967
bengrubb
ParticipantHi there!
I have been using the free version of The Newsletter Plugin for about a year now and have today been cleaning up my WordPress admin back-end, as it’s been quite slow.
Using the Query Monitory plugin, I discovered that The Newsletter Plugin performs a licence and plugin check on every single load of any wp-admin page. Not just its own plugin pages.
All in all, it’s taking up 1.2 seconds of load time.
It loads this URL in 0.8 seconds
https://www.thenewsletterplugin.com/wp-content/plugins/file-commerce-pro/get-license-data.phpAnd it loads this URL in 0.5 seconds:
http://www.thenewsletterplugin.com/wp-content/extensions.json
?ver=8.7.7Is this expected behaviour? Can I do anything to improve the load time? I wrote some code to see what would happen if I disabled both of those URLs loading and it sped up wp-admin pages, but of course The Newsletter Plugin did not like this lol. I could try to write some code that disables it on every admin page except for the plugin’s but I’ll probably break something agian.
Any ideas? And is is really necessary to have those URLs load on every wp-admin page? Is this something The Newsletter Plugin could change in a future update?
April 13, 2025 at 6:22 am #342968bengrubb
ParticipantFor what’s it’s worth, the below code successfully blocked the calls to those URLs outside of the The Newsletter Plugin pages in wp-admin, thereby increasing their load time.
Initially it caused the plugin to throw up messages about the licence check failing, but I think this may have been because of a conflict WP Code snippet I had enabled. Waiting to see what happens.
add_filter( ‘pre_http_request’, function( $pre, $args, $url ) {
if ( ! is_admin() ) return $pre;// Allow if we’re on the newsletter plugin’s main admin page
if ( isset($_GET[‘page’]) && $_GET[‘page’] === ‘newsletter_main_index’ ) {
return $pre;
}// Block external requests to thenewsletterplugin.com elsewhere in wp-admin
if ( strpos( $url, ‘thenewsletterplugin.com’ ) !== false ) {
return new WP_Error( ‘request_blocked’, ‘Blocked external request to thenewsletterplugin.com’ );
}return $pre;
}, 10, 3 );—
April 13, 2025 at 7:20 am #342969bengrubb
ParticipantI updated the code to the following after accounting for different URL variables (as I was getting more licence issues on other The Newsletter Plugin pages:
add_filter( ‘pre_http_request’, ‘gsn_allow_newsletter_plugin_requests’, 10, 3 );
function gsn_allow_newsletter_plugin_requests( $pre, $args, $url ) {
if ( ! is_admin() ) {
return $pre;
}// Allow all admin pages related to The Newsletter Plugin
if ( isset($_GET[‘page’]) && strpos($_GET[‘page’], ‘newsletter_’) === 0 ) {
return $pre;
}// Block specific external domains (e.g. Newsletter license checks elsewhere)
if ( strpos( $url, ‘thenewsletterplugin.com’ ) !== false ) {
return new WP_Error( ‘request_blocked’, ‘Blocked external request to thenewsletterplugin.com’ );
}return $pre;
}—
so far so goodApril 13, 2025 at 10:37 am #342972Stefano
KeymasterHi, thank you for reporting, it seems like a problem with the license checking it should cache the response (or the error condition), I’ll check the code carefully it could be is a bug.
April 13, 2025 at 11:04 am #342974Stefano
KeymasterHi, could it be on your site, the WP transients are not saved/kept?
April 13, 2025 at 2:37 pm #342978bengrubb
ParticipantI think you might be right. It would appear to be something to do with transients.
I installed Transients Manager and the below is what I see. Some very old, expired transients are in there and no fresh ones (with my code from above disabled). Why this is happening I do not know. I do have a few plugins installed. I use Godaddy, which may be doing some persistent object caching?
—-
newsletter_topbar
Edit | Delete
a:3:{s:5:”count”;s:1:”0″;s:5:”total”;N;s:4:”sent”;N;}
array
2025-02-25 13:25:29
Expired
Select newsletter_user_count
newsletter_user_count
Edit | Delete
244
numeric
2025-02-16 11:31:45
Expired
—-
These are the plugins I currently have that are active:
Sphere CoreSphere Post Views
SSL Insecure Content Fixer
Transients Manager
Two Factor
URL Shortify
User Role Editor
WP Control
WP Mail SMTP
WPCode Lite
XML Sitemap & Google News
Akismet Anti-Spam: Spam Protection
Conditional Display Featured Image on Singular Posts and Pages
Donorbox Donation Form
Edit Author Slug
Elementor
Favicon by RealFaviconGenerator
Health Check & Troubleshooting
Limit Login Attempts Reloaded
Molongui Authorship
Newsletter
Newsletter – Addons Manager and Support
Newsletter – Instasend (BETA)
Newsletter – SMTP2GO
Performance Lab
Query Monitor
Redirecton
Responsive Lightbox & Gallery
Site Kit by Google
SmartMag Core
April 13, 2025 at 2:51 pm #342979Stefano
KeymasterUhm, since the WP transients create us many problems in the past, I’ll manage to convert the stored data from transients to standard options.
Anyway, you can check if the wp_options table has problems, especially if it is a myISAM table.April 13, 2025 at 2:53 pm #342981bengrubb
ParticipantThank you!
Unrelated to the issue at hand (I think), I did notice The Newsletter Plugin was requesting http rather than https on this URL: http://www.thenewsletterplugin.com/wp-content/extensions.json
?ver=8.7.7It does request https for get-license-data.php. Just thought I’d pass that on.
I’ll continue looking at what might be playing up on my web server.
Thanks again for your help.
April 13, 2025 at 3:03 pm #342982Stefano
KeymasterUsually we have a fallback from HTTPS to HTTP. Maybe that file is requested only with HTTP. Many hosting providers have wrong SSL certificates installed, the fallback helps in solving those problems.
April 13, 2025 at 3:07 pm #342983bengrubb
ParticipantI see re http/https.
For what it’s worth, my wp_options table (named mdpm_options) is InnoDB and not myISAM.
I am on a GoDaddy shared hosting account, not a managed WordPress account, so I am thinking persistent object caching maybe isn’t the cause. It’s probably something to do with GoDaddy though.
April 13, 2025 at 5:04 pm #342987Stefano
KeymasterObject caches are good candidates for creating problems with transients, but it’s hard to have a definitive answer. Usually, they completely get wrong caching missing values.
-
AuthorPosts
- You must be logged in to reply to this topic.