-
Notifications
You must be signed in to change notification settings - Fork 0
Description
From Memo as part of Four Kitchens support:
I made a site admin review and below are the things checked and the review of them:
- There is a test admin user to check if it can be delete: Kai Lucas-Baradan TEST
5 Plugins disabled:
- - There are 3 disabled plugins that can be deleted: Custom Post Type UI, External Media without Import and FG DI Migrate
- - There are 2 disabled plugins to review if they are not going to be used anymore they can be deleted: WP All Export Pro and Calais Auto Tagger
- - I Confirmed that XMLRPC is disabled to avoid possible DDOS attacks
New relic stats
Database
I saw only one slow query that needs to be reviewed and see if it can be improved, the query is executed in the plugin xml-sitemap-feed, it is not crucial because it is not used very often but will be good to check.
Other queries look fine and the slowest or most consuming time came from WP core or graphql and not shown as slow queries very often.
Transactions are fine, the highest response is 800ms and they look stable.
I contacted xml-sitemap-feed plugin's author to see if they have an improvement in the slow query found in new relic. No answer yet.
Below is the list of queries to check possible database cleanup:
This is what i found as possible database cleanup:
-- Select all posts with post_type = 'revision'
[unused_terms.txt](https://github.com/user-attachments/files/23245479/unused_terms.txt)
[unused_terms.txt](https://github.com/user-attachments/files/23245480/unused_terms.txt)
SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision';
Results: 268898
-- Select all posts with post_status = 'trash'
SELECT COUNT(*) FROM wp_posts WHERE post_status = 'trash';
Results: 3
-- Select all posts with post_status = 'auto-draft'
SELECT COUNT(*) FROM wp_posts WHERE post_status = 'auto-draft';
Results: 9
-- Select all postmeta with post_id not in posts
SELECT COUNT(*) FROM wp_postmeta WHERE post_id NOT IN (SELECT ID FROM wp_posts);
Results: 48
-- Select all term_relationships with object_id not in posts
SELECT COUNT(*) FROM wp_term_relationships WHERE object_id NOT IN (SELECT ID FROM wp_posts);
Results: 4
-- Select UNUSED terms
SELECT t.term_id, [t.name](http://t.name/)
FROM wp_terms AS t
LEFT JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id
LEFT JOIN wp_term_relationships AS tr ON tt.term_taxonomy_id = tr.term_taxonomy_id
WHERE tr.object_id IS NULL;
Results: 9603
List of unused terms is attached. unused_terms.txt