wordpress-plugin

Installation
SKILL.md

Building a WordPress plugin

A WordPress plugin is plain PHP with a header-comment manifest — no build step, no framework SDK. The main file's header block (Plugin Name, Version, Text Domain, …) IS the manifest WordPress reads. Source lives in integrations/wordpress-plugin/. It is a thin frontend over your own public REST API: WordPress hooks supply the events (save_post, settings pages, editor metaboxes); wp_remote_request calls your API with the user's own team API key. Read this before the first file; the command-level playbook is in itsryanarmani/scripts scripts/wordpress-plugin/README.md.

When to use

  • Triggers: 'build a WordPress plugin', 'submit a plugin to wordpress.org', 'plugin review rejected', 'readme.txt stable tag', 'plugins.svn.wordpress.org trunk tags', 'wp_remote_request', 'nonce verification', 'wp-env'.
  • Reviewers grep every $_POST/$_GET for nonce, capability and sanitize (the top rejection); escape output late.
  • readme.txt 'Stable tag' must equal the header Version and a real SVN tag; plugin-page assets live in SVN /assets, not trunk; the folder and text domain must match the approved slug. Each review round costs days to weeks.
  • Siblings: canva-app, zapier-integration, browser-extension, figma-plugin, connector-directory-submission.

The trap that wastes a week: review greps every $_POST, and each bounce re-queues you for days

WordPress.org review is manual — a volunteer reads your code, and every rejection puts you back in a days-to-weeks queue. The #1 bounce cause is a $_POST / $_GET / $_REQUEST read without the full guard triplet:

  1. Nonce — wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['your_nonce'] ) ), 'your_action' ) for forms; check_ajax_referer() for AJAX.
  2. Capability — current_user_can( 'manage_options' ) for settings, current_user_can( 'edit_post', $post_id ) for metabox saves.
  3. Sanitize in, escape out — sanitize_text_field / sanitize_key / absint on input; esc_html / esc_attr / esc_url at the echo, not at assignment. wp_unslash() BEFORE sanitize — WordPress magic-quotes superglobals, so sanitizing a slashed value is both a bug and a PHPCS flag.
Installs
1
GitHub Stars
1
First Seen
Nov 15, 2026