Tag Div Composer – Heavy Search Queries

Posted in: Newspaper
Post count: 20

Hi – Our host flagged this for us. Can you review and let us know what we need to do fix?

Beyond this we are picking up on heavy search queries that work around the plugin td-composer. The specific file triggered is:

wp-content/plugins/td-composer/legacy/common/wp_booster/td_data_source.php line 1517

The site is spawning quite a few of them, and it’s the main contributor to the high load:

==============================================================================================================
Host:     barrettmedia.com
Request:  /page/2/?s=cbs+evening+news
Remote:   17.246.23.246
UA:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)
Started:  2026-07-21T21:18:39.878639Z
SQL:      SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID  FROM wp_posts   WHERE 1=1  AND wp_posts.ID NOT IN (237966) AND (((wp_posts.post_title LIKE '%cbs%') OR (wp_posts.post_excerpt LIKE '%cbs%') OR (wp_posts.post_content LIKE '%cbs%')) AND ((wp_posts.post_title LIKE '%evening%') OR (wp_posts.post_excerpt LIKE '%evening%') OR (wp_posts.post_content LIKE '%evening%')) AND ((wp_posts.post_title LIKE '%news%') OR (wp_posts.post_excerpt LIKE '%news%') OR (wp_posts.post_content LIKE '%news%')))  AND (wp_posts.post_password = '')  AND wp_posts.post_type IN ('post', 'page', 'attachment', 'job_listing', 'tdc-review') AND ((wp_posts.post_status = 'publish')) OR EXISTS (                                 SELECT 1 FROM wp_term_relationships AS tr                                 INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id                                 INNER JOIN wp_terms AS t ON tt.term_id = t.term_id                                 WHERE tr.object_id = wp_posts.ID                                 AND tt.taxonomy = 'category'                                 AND ( t.name LIKE '%cbs evening news%' OR tt.description LIKE '%cbs evening news%' )                                 AND wp_posts.post_status = 'publish'                                                              ) OR EXISTS (                                 SELECT 1 FROM wp_term_relationships AS tr                                 INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id                                 INNER JOIN wp_terms AS t ON tt.term_id = t.term_id                                 WHERE tr.object_id = wp_posts.ID                                 AND tt.taxonomy = 'post_tag'                                 AND ( t.name LIKE '%cbs evening news%' OR tt.description LIKE '%cbs evening news%' )                                 AND wp_posts.post_status = 'publish'                                                              ) OR EXISTS (                                 SELECT 1 FROM wp_term_relationships AS tr                                 INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id                                 INNER JOIN wp_terms AS t ON tt.term_id = t.term_id                                 WHERE tr.object_id = wp_posts.ID                                 AND tt.taxonomy = 'tdc-review-criteria'                                 AND ( t.name LIKE '%cbs evening news%' OR tt.description LIKE '%cbs evening news%' )                                 AND wp_posts.post_status = 'publish'                                                              )  GROUP BY wp_posts.ID  ORDER BY (CASE WHEN wp_posts.post_title LIKE '%cbs evening news%' THEN 1 WHEN wp_posts.post_title LIKE '%cbs%' AND wp_posts.post_title LIKE '%evening%' AND wp_posts.post_title LIKE '%news%' THEN 2 WHEN wp_posts.post_title LIKE '%cbs%' OR wp_posts.post_title LIKE '%evening%' OR wp_posts.post_title LIKE '%news%' THEN 3 WHEN wp_posts.post_excerpt LIKE '%cbs evening news%' THEN 4 WHEN wp_posts.post_content LIKE '%cbs evening news%' THEN 5 ELSE 6 END), wp_posts.post_date DESC  LIMIT 0, 5
Origin:   plugin | td-composer | wp-content/plugins/td-composer/legacy/common/wp_booster/td_data_source.php:1517
Duration: 3.698309 s
Memory:   42.00 MB (peak 42.00 MB)

Such queries, taking around 4 seconds to be completed, will slow the entire site, so I’d recommend revisiting the code around that function

Post count: 20685

Hi,

From what I see that’s a search query made by a bot called Applebot. Except the fact that it takes longer to complete, I see no problem with it. Any person, or bot, or automated tool, can perform a search on a wordpress website, unless this function is specifically disabled.

If there are many similar search requests from bots, I suggest looking into protecting the website from them more. You could disallow search queries using the robots file, as mentioned in this guide -> https://www.searchenginejournal.com/robots-txt-wordpress/544255/ -> https://prnt.sc/_y68GwchjiyD That Applebot request from your example looks like a legit bot, it should respect the disallow.

Thank you!

Post count: 20

Thank you Simion!

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