W

wordpress-performance-best-practices

by @bartekmisv
4.2(91)

WordPressコードがWebパフォーマンスのベストプラクティスに準拠しているかを確認し、最適化の推奨事項を提供し、ウェブサイトの読み込み速度とユーザーエクスペリエンスを向上させます。

wordpressweb-performancecachingcdnimage-optimizationGitHub
インストール方法
npx skills add bartekmis/wordpress-performance-best-practises --skill wordpress-performance-best-practices
compare_arrows

Before / After 効果比較

1
使用前

WordPressのパフォーマンスに関するベストプラクティスに従っていないウェブサイトは、通常、読み込みが遅く、画像が最適化されておらず、キャッシュ設定が不適切であるため、ユーザーの離脱率が高くなり、検索エンジンのランキングが低下します。

使用後

WordPressのパフォーマンスに関するベストプラクティスを適用すると、ウェブサイトの読み込み速度が大幅に向上し、画像が最適化され、キャッシュメカニズムが改善され、ユーザーエクスペリエンスとSEOパフォーマンスの両方が向上します。

SKILL.md

wordpress-performance-best-practices

WordPress Performance Best Practices

Comprehensive performance optimization guide for WordPress development, designed for AI agents and LLMs. Contains 34 rules across 8 categories, prioritized by impact to guide code review and generation.

When to Apply

Reference these guidelines when:

  • Writing WordPress plugins or themes

  • Working with WP_Query or database operations

  • Implementing caching (transients, object cache)

  • Optimizing asset loading (scripts, styles)

  • Reviewing WordPress code for performance issues

  • Working with REST API or AJAX handlers

Rule Categories by Priority

Priority Category Impact Prefix

1 Database Optimization CRITICAL db-

2 Caching Strategies CRITICAL cache-

3 Asset Management HIGH asset-

4 Theme Performance HIGH theme-

5 Plugin Architecture MEDIUM-HIGH plugin-

6 Media Optimization MEDIUM media-

7 API and AJAX MEDIUM api-

8 Advanced Patterns LOW-MEDIUM advanced-

Quick Reference

1. Database Optimization (CRITICAL)

  • db-prepared-statements - Always use $wpdb->prepare() for queries

  • db-avoid-post-not-in - Avoid post__not_in, filter in PHP instead

  • db-use-wp-query - Use WP_Query/get_posts instead of direct DB queries

  • db-limit-query-results - Never use posts_per_page => -1

  • db-meta-query-indexing - Optimize meta queries, consider taxonomies

  • db-fields-optimization - Use fields => 'ids' when only IDs needed

2. Caching Strategies (CRITICAL)

  • cache-transients-proper-use - Use transients for external API calls

  • cache-object-cache - Use wp_cache_* with cache groups

  • cache-remote-requests - Always cache wp_remote_get responses

  • cache-invalidation - Implement precise, event-driven invalidation

  • cache-fragment-caching - Cache expensive template fragments

3. Asset Management (HIGH)

  • asset-proper-enqueue - Use wp_enqueue_script/style, never hardcode

  • asset-conditional-loading - Only load assets where needed

  • asset-defer-async - Use defer/async for non-critical scripts

  • asset-dequeue-unused - Remove unused plugin assets

  • asset-minification - Minify assets, use critical CSS

4. Theme Performance (HIGH)

  • theme-avoid-queries-in-templates - Keep queries out of template files

  • theme-template-parts - Use get_template_part with data passing

  • theme-loop-optimization - Optimize loops, use meta/term cache priming

  • theme-hooks-placement - Use appropriate hook priorities

5. Plugin Architecture (MEDIUM-HIGH)

  • plugin-conditional-loading - Load code only when needed

  • plugin-autoloading - Use PSR-4 autoloading

  • plugin-activation-hooks - Use activation hooks for setup tasks

  • plugin-hook-removal - Remove hooks properly with matching priority

6. Media Optimization (MEDIUM)

  • media-responsive-images - Use srcset and sizes attributes

  • media-lazy-loading - Lazy load below-fold, eager load LCP

  • media-image-sizes - Define appropriate custom image sizes

7. API and AJAX (MEDIUM)

  • api-rest-optimization - Optimize REST endpoints, add caching headers

  • api-admin-ajax - Use REST API for frontend, avoid admin-ajax

  • api-nonce-validation - Implement proper nonce validation

8. Advanced Patterns (LOW-MEDIUM)

  • advanced-autoload-optimization - Keep autoloaded options under 800KB

  • advanced-cron-optimization - Use system cron, batch long tasks

  • advanced-memory-management - Process in batches, clean up memory

  • advanced-query-monitor - Profile before optimizing

How to Use

Read individual rule files for detailed explanations and code examples:

rules/db-prepared-statements.md
rules/cache-transients-proper-use.md
rules/_sections.md

Each rule file contains:

  • Brief explanation of why it matters

  • Incorrect code example with explanation

  • Correct code example with explanation

  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md Weekly Installs320Repositorybartekmis/wordp…ractisesGitHub Stars9First SeenJan 20, 2026Security AuditsGen Agent Trust HubPassSocketPassSnykPassInstalled onopencode275gemini-cli265codex256github-copilot246kimi-cli208amp208

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数433
評価4.2 / 5.0
バージョン
更新日2026年5月23日
比較事例1 件

ユーザー評価

4.2(91)
5
23%
4
52%
3
23%
2
2%
1
0%

この Skill を評価

0.0

対応プラットフォーム

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

タイムライン

作成2026年3月16日
最終更新2026年5月23日