If you’ve profiled a WordPress archive page with Query Monitor, you’ve probably seen this pattern without knowing what it was: Two queries, back to back, for the exact same batch of post IDs. One fetches the posts. The second – often slower, despite doing “less” – fetches metadata nobody asked for. That second query is… Continue reading Optimize WP_Query Performance: Skipping Meta Cache Priming the Right Way
Month: July 2026
Jest Testing Best Practices: Implementation Tests vs Behavior Tests Explained
When you write a Jest test for a Gutenberg block’s save function, there are usually two paths you can take: test what was called, or test what got rendered. They look similar on the surface, but they lead to very different test suites. Approach 1: Testing Implementation Details This test checks that useBlockProps.save was called… Continue reading Jest Testing Best Practices: Implementation Tests vs Behavior Tests Explained