WordPress Theme and Plugin Development

Build and debug WordPress themes, plugins, blocks, WooCommerce extensions, and REST endpoints with targeted security checks.

Development / Engineeringwordpressplugin-development
by AgentVoltv1.0.0
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

Prompt“Build a custom product filter widget for a WooCommerce store with color and size options”
Beforegeneric AI agent
You can build a product filter in WooCommerce pretty easily. There are some plugins that do it already, but if you want custom code, you'd write a shortcode or block that queries products. You'd probably use the REST API to get the filters dynamically. You might need to handle the user interaction somehow, maybe with JavaScript. Do you want it to use AJAX to update the products without reloading? And should it be a sidebar widget or inline on the page? Let me know more details about your setup.
Afterwith WordPress Theme and Plugin Development
CUSTOM FILTER WIDGET: ProductFilter.php

REGISTERATION (gutenberg block)
register_block_type('custom/product-filter', array(
  'render_callback' => 'render_product_filter',
  'attributes' => array(
    'taxonomy' => 'pa_color',
    'maxResults' => 500
  )
));

FILTER LOGIC
• Query: WC_Product_Query with tax_query for pa_color and pa_size
• Sanitize inputs: sanitize_text_field() on $_GET['color'], validate against registered attributes
• Escape output: wp_kses_allowed_html() on frontend, never trust user input

REST API ENDPOINT (AJAX alternative)
GET /wp-json/custom/v1/products?color=red&size=large
• Nonce verification on every call
• Rate limit: 30 requests/minute per IP (prevent scraping)
• Cache: 1 hour Redis TTL for popular filter combinations

SECURITY HARDENING
• No SELECT * queries; fetch only ID, name, price, image URL
• Prepared statements for all database queries
• Check user capabilities before exposing private product data
• Escape all echoed values wp_kses_post() for attribute output

PERFORMANCE TUNING
• Index: wp_postmeta(meta_key='pa_color') for fast lookups
• Lazy load color swatches (first 12 options, paginate via AJAX)
• Compress SVG color swatches to data URIs (no extra HTTP requests)

CROSS-SELL INTEGRATION
• If user filters to 1 product: show "similar items in red size M" upsell below

About this skill

Your checkout field saves in one checkout but disappears in another. Your custom block looks right in the editor but breaks on the site, or your REST endpoint accepts changes from the wrong users. This skill identifies the WordPress architecture involved and delivers code with the right hooks, permissions, storage, and verification steps.

What it does

  • Places functionality in the appropriate plugin, child theme, block theme, or Gutenberg block without modifying core.
  • Builds blocks and patterns with deliberate editor, frontend, rendering, and asset-loading behavior.
  • Extends WooCommerce using checkout-specific integrations and order APIs that avoid assumptions about database storage.
  • Implements REST endpoints with argument validation, object-level authorization, and appropriate authentication handling.
  • Reviews input handling, output escaping, database access, and capability checks at the actual trust boundaries.
  • Diagnoses slow queries, cache mistakes, and repeated work before proposing performance changes.

What you get

A focused patch or complete implementation with file placement, dependency assumptions, and behavior-specific verification steps. Reviews identify concrete failure paths and supply corrections, while larger builds include rollout and data-handling decisions.

Best for

Developers maintaining custom WordPress sites, building plugins or Gutenberg blocks, extending WooCommerce stores, or reviewing WordPress code before release.

SKILL.md preview

SKILL.md
---
name: wordpress-theme-and-plugin-development
description: >-
  Builds and debugs WordPress themes, plugins, Gutenberg blocks, WooCommerce extensions, and REST endpoints by tracing hooks, trust boundaries, storage APIs, and rendering behavior. Use when the user says "build a WordPress plugin", "customize my block theme", "my Gutenberg block breaks on the frontend", "my checkout field won't save", "secure this REST endpoint", "review this WordPress code", or "my WordPress site keeps getting slower".
---

# WordPress Theme and Plugin Development

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →