Hi @janmazanek we’ll take a closer look at this right away. For the RSS triggers, I want to confirm that we do use the is_feed() function to then add the image only when the current request is for the RSS feed itself, none of that code should be running on non-feed page requests. We also use appropriate actions and such as well. There is some code that runs on admin pages, but we also evaluate if the admin page is our own admin page before running it. There may be some licensing SDK code that handles licensing with the Premium version, and performs external requests, but it should not be running with the free version, and it should cache those requests so they are not running on every page request.
Note that we have very large sites with page caching in place using our plugin and they experience no performance issues, so it may also be other plugins, plugin or theme conflicts, or the unique structure of your site causing the plugin to have some issues that affect performance.
I will do more profiling and see if I can spot what code would be causing any time during a normal page request.
@5starplugins thank you for reply. I do not know how exactly your plugin works, but I can’t see any call to is_feed() in featured_images_in_rss.php.
Maybe you could simply change line 21 from:
if ( !function_exists( ‘fifrf_fs’ ) ) {
to:
if (is_feed() && !function_exists( ‘fifrf_fs’ ) ) {
?
Or mayby you could move the code from this script to subfolder “includes” and create lightweight featured_images_in_rss.php with content:
if (is_feed()) {
include_once(‘includes/name-of-script-containing-the-main-code.php”);
}
Hi @janmazanek I took a look and we actually use a filter on the_excerpt_rss instead of is_feed, so that code only runs when the native WP function is called to generate the feed:
add_filter(
'the_excerpt_rss',
'firss_featured_images_in_rss',
1000,
1
);
and then that function only runs if there is a featured image set:
if ( has_post_thumbnail( $post->ID ) ) { ... }
The fifrf_fs() code needs to run on init because it handles licensing, and adding admin options pages etc, which are outside the scope of the rss generation process.
Hi @janmazanek I also did a test using the Code Profiler plugin that you mentioned, and our plugin used 0.013 seconds of execution time in repeated tests on a live site, very performant in repeated uses. I also tested the /feed/ URL and it uses 0.062 seconds of execution time.
So I am not seeing any specific slowness attributed to the plugin itself, but there may be other plugins or theme options affecting the speed of the site, and the speed of plugin execution in general, including server load, etc.