Code Engine – PHP Snippets, AI Functions & Automation for WordPress
Code Engine is a snippets manager that doesn’t stop at snippets. Yes, it runs your PHP and JavaScript exactly where and when you want: frontend, backend, on a schedule, or inside your content. But its real magic is what happens after you write a function: the same little piece of code instantly becomes a tool your AI chatbots can call, a step you can drag into a visual workflow, and an endpoint the outside world can trigger. One function, three superpowers. Most “code snippets” plugins stop at a textarea and a toggle. Code Engine treats your functions as first-class building blocks for the whole Meow Apps ecosystem, and for anything that can speak REST. Think out of the box, let your creativity flow, because the possibilities really are endless! ✨ For more, check the official website and come say hi on the Discord. Quick Intro Hello! ☀️ I built Code Engine because I was tired of pasting mystery snippets into functions.php and praying. I wanted a place where small bits of code are organized, safe, AI-assisted, and reusable everywhere. Here’s the idea. You write a function (or let the AI write it for you from a plain-English description). That function immediately shows up in three places: AI Engine: your chatbots and MCP clients (Claude, ChatGPT, Claude Code) can call it as a tool, with real arguments. Ask “how many orders shipped today?” and your chatbot runs your function to answer. Workflow Engine: your function appears in the step picker as its very own block. Drag it onto the canvas, wire it between an AI step and a Slack step, done. No glue code. REST / External tools: give it a secure endpoint and a token, then trigger it from Make.com, n8n, Zapier, a cron job, or a webhook. You never wrote an “integration.” You just wrote a function. Code Engine did the rest. 🤝 Core Modules 🧩 Snippets Manager Backend, Frontend, Persistent, Scheduled, Functions, and in-content (PHP/JS) snippets, all in one clean dashboard with tags, search, scope filters, and priorities. 🪄 AI-Assisted Coding Describe what you want in plain English and let AI Engine write the snippet: code, name, arguments, and scope included. Refine existing code or implement it straight from your comments. 🤖 Functions as AI Tools Every Function snippet becomes a function-calling tool and an MCP tool, so your AI Engine chatbots (and external AI agents) can actually do things on your site, not just talk. 🔀 Functions as Workflow Steps Workflow Engine surfaces each of your functions as its own draggable step. Your custom logic becomes a first-class citizen on the automation canvas. 🌐 External Access (REST) Expose any runnable snippet through a secured REST endpoint with a bearer token. Perfect for Make.com, n8n, webhooks, and scheduled external jobs. 🛡️ Safe Mode A snippet that throws a fatal error is automatically caught and disabled before it can take your site down. Code with confidence. ⏰ Scheduling Run a snippet daily at a chosen time via WP-Cron (reports, cleanups, syncs) without touching the server crontab. 🧱 Code Blocks & Shortcodes (Pro) Drop PHP or JS straight into a post or page with a Gutenberg block or the [code-engine] shortcode, with safety guards. 🧩 Snippets, the way they should be Code Engine organizes your code by scope, so each snippet runs exactly where it belongs: Persistent: runs everywhere (frontend and backend). Your everyday “add this to functions.php” code, but managed. Frontend: runs only on the public site. Backend: runs only in the admin. Function: a named, callable function with typed arguments and defaults. This is the reusable building block (see below). Scheduled: runs on a WP-Cron schedule, at the hour and minute you pick. Content (PHP / JS): runs inside a specific post or page, via a Gutenberg Code Block or the [code-engine] shortcode (Pro). Everything is searchable, taggable, sortable by priority, and importable/exportable. The CodeMirror editor gives you proper syntax highlighting and keyboard shortcuts (Cmd+S to save, Cmd+Enter to run). A nikic/php-parser pass validates your PHP before it ever runs. 🪄 Let AI write it for you Don’t feel like writing the boilerplate? Describe the snippet in plain language and Code Engine, powered by AI Engine, generates the whole thing: the code, a sensible name, a description, the right scope, and, for functions, the argument list with names, types, and defaults. Already have code? Ask the AI to modify it from a prompt, or write a few comments describing what you want and let it fill in the implementation. It’s pair programming, right inside your dashboard. ✨ The big idea: write once, use everywhere This is what makes Code Engine different. A Function snippet is not just code you call from other code. It’s a reusable capability that the rest of your stack can plug into. The moment you save it, the same function is available in three places at once: 1. As an AI tool, for chatbots and AI agents With AI Engine active, your functions are exposed through function calling and over MCP (Model Context Protocol). Your on-site chatbot can run them mid-conversation, and external AI agents (Claude, Claude Code, ChatGPT, OpenClaw) can call them too. Want a chatbot that checks stock, looks up a booking, or kicks off a process? Write the function; the chatbot gains the skill. 2. As a workflow step, for automation With Workflow Engine, every active function shows up in the Add-step picker as its own block, named after your snippet, with one input per argument. Drag it onto the canvas and wire it between other steps: an AI step that summarizes, your function that saves, a Social Engine step that posts. There’s also a generic “Execute snippet (by ID / by name)” step when you want to call one dynamically. You never write integration code; your function is the integration. 3. As a REST endpoint, for the outside world Give a snippet a custom endpoint name and a bearer token, and it’s instantly callable from anywhere: POST /wp-json/code-engine/v1/snippets-endpoint/your-endpoint Pass arguments as JSON in the body, secure it with a token, and trigger it from Make.com, n8n, Zapier, GitHub Actions, or a humble cron job. Automation without a middleware bill. 🛡️ Safe by default Running arbitrary code is powerful, so Code Engine takes safety seriously: Safe Mode catches fatal errors and auto-disables the offending snippet, so a typo never white-screens your site. REST whitelisting means global snippets only run on trusted REST routes by default, so you choose what to open up. Per-snippet tokens secure your external endpoints. Validation with a real PHP parser before code is saved. For developers who want fewer guardrails, there’s a “Bypass REST Security” option and filters (mwcode_rest_authorized, mwcode_rest_whitelist) to tailor exactly what’s allowed. Works beautifully with the Meow Apps family Code Engine is one engine in a connected set, each one useful alone, magical together: AI Engine: chatbots, content generation, and MCP. Turns your functions into AI tools. Workflow Engine: visual automation. Turns your functions into draggable steps. SEO Engine: smart, lightweight AI SEO. Social Engine: schedule and automate social posts. Why Code Engine? Reusable, not throwaway Other snippet plugins give you a place to paste code. Code Engine gives you a place to build capabilities that your AI, your workflows, and your external tools can all use. Native to WordPress Clean, fast, and built the WordPress way. No clunky external dashboards, no bloat. AI-native Write snippets with AI, expose them to AI. The whole loop lives in your wp-admin. Developer friendly REST API, MCP tools, function calling, scheduling, import/export, and plenty of filters to hook into. Cared for Part of the Meow Apps family, with regular updates and a real human behind it. 💕
Top keywords
- code32×2.48%
- engine25×1.94%
- ai22×1.71%
- function18×1.40%
- rest13×1.01%
- snippet13×1.01%
- code engine11×0.85%
- functions11×0.85%
- write10×0.78%
- runs9×0.70%
- snippets9×0.70%
- step9×0.70%
SiteAgent for Aura
SiteAgent turns every WordPress site into one an AI agent can safely operate — update, maintain, audit, and fix. Once the site is connected to Aura and its approval key is provisioned, mutating actions are gated behind human approval and recorded in a full audit trail; safe batch updates and block edits are snapshotted so they can be rolled back. It’s the on-site half of Aura, the governed control room agencies use to run whole fleets of client sites alongside their servers, CDN, and DNS. Plugin and core updates are the riskiest thing you do on a live client site. SiteAgent makes them safer: safe batch updates run behind health checks and roll back automatically if the site breaks, and every plugin in that path is zip-snapshotted first. With Aura’s approval key in place, an agent can’t silently push a change — mutating actions wait for a human to approve them. Think of it as the undo button for AI on your clients’ sites. Install this plugin on any WordPress site to connect it to Aura — no SSH, no wp-admin juggling, no manual logins. What You Can Do Monitor site health — See WordPress version, PHP version, installed plugins & themes, database info, and disk usage in real time. Update plugins, themes & core remotely — Push updates to any connected site from the Aura dashboard, no wp-admin login. Safe batch updates with auto-rollback — Run chunked updates with health checks; if an update breaks the site, the plugin restores the previous version automatically. Per-plugin rollback — Every update is zip-snapshotted first; restore any plugin to its last good state on demand. Bulk translation & database upgrades — Update all language packs and run WordPress database migrations remotely. One-click connect (magic link) — Connect a site to Aura straight from wp-admin — no manual token copy/paste. AI-agent ready (27 MCP tools) — Exposes machine-readable, JSON-schema tools for AI-driven management, including SEO/accessibility/performance/broken-link auditors, on-site SEO-meta read/write (Rank Math, Yoast, SEOPress), and Gutenberg block read/edit. Read tools run on demand; mutating tools are approval-gated through Aura, and every call is audited. Zero frontend impact — The plugin only registers REST API endpoints. No scripts, no styles, no database queries on visitor-facing page loads. How It Works After activation, click Connect to Aura on the Settings → SiteAgent page for a one-click magic-link connection, or copy the Site Token shown once and paste it into your Aura dashboard manually. From that point, Aura communicates with your site over a signed, authenticated REST API to pull health data and push updates. Security Defence-in-depth protects every request: WordPress Application Password — Standard WordPress auth with capability checks (manage_options / update_*). Only authorized administrators can trigger actions. Hashed Site Token — A per-site token sent via the X-Aura-Token header. Only a SHA-256 hash is stored (never the raw token), compared timing-safely. Tokens from older versions migrate to a hash automatically. Brute-force throttling — Repeated bad-token attempts from an IP are blocked. Signed magic-link connect — The onboarding callback is HMAC-signed with a one-time secret and timestamp, so the token exchange can’t be hijacked or replayed. IP / Domain allowlist (optional) — Restrict API access to your Aura instance, with Cloudflare and reverse-proxy header support. You can rotate the token anytime from Settings → SiteAgent → Regenerate Token. REST API Endpoints Core endpoints under /wp-json/aura/v1/: GET /status — Full site health report GET /updates — Check available updates (core, plugins, themes, translations) POST /update/core / /update/plugin / /update/theme / /update/translations — Apply updates POST /update/database — Run WordPress database upgrades POST /connect — Magic-link token exchange (public, HMAC-signed, 10-minute expiry) Version 2 endpoints under /wp-json/aura/v2/: GET /health — HTTP, PHP fatal, white-screen and DB connectivity checks POST /update/batch — Chunked batch updates with auto-rollback on health failure POST /rollback/{plugin} — Restore a plugin from its most recent backup POST /rules — Receive Aura’s signed operator ruleset; carrying unbind: true it ends this site’s binding instead While a site is disconnected by Aura, every write endpoint answers 403 aura_site_unbound and reads keep working; the disconnect answer carries cleanup_complete and leftovers (what the site still holds), and GET /status reports unbound until the site is reconnected or the remaining Aura data is removed from the settings screen. MCP tools under /wp-json/aura/mcp/: POST /tools/list / POST /tools/execute — Enumerate and run AI-agent tools GET /context — Full site context for AI decision-making AI Agent Tools (MCP) SiteAgent ships 27 built-in tools for AI agents. Read tools return information and run on demand; write tools change the site and are queued for human approval through Aura — an agent can never silently mutate a production site. Read tools: get_site_context — WordPress/PHP/theme/plugin/disk/performance snapshot with detected issues get_database_info — Database size, largest tables, autoloaded-options weight, expired transients scan_security — Scored security posture (file-edit lockdown, debug exposure, SSL, default admin/prefix, open registration, PHP version) scan_seo — SEO posture (search-engine visibility, permalinks, XML sitemap, site title) plus a sampled content audit (thin content, missing excerpts/featured images) scan_a11y — Accessibility audit over sampled content (images missing alt text, non-descriptive link text, heading structure, document language) perf_check — Performance posture (persistent object cache, OPcache, page-cache plugin, PHP version, autoload weight, active plugin count, memory limit) scan_broken_links — Link triage over a content sample with no outbound HTTP (empty/anchor-only links, dev/staging hosts, unresolved internal links) list_users — Users with roles and post counts, administrators flagged (never returns secrets) check_health — Live health gate: HTTP status, PHP fatals, white-screen, database connectivity scan_error_log — Tails and severity-groups the error log, surfacing recent fatals check_vulnerabilities — Plugin update-currency check against WordPress.org (a version check, not a vulnerability/CVE feed; covers wp.org-hosted plugins) check_core_checksums — Core-file integrity against the official WordPress.org checksum manifest (modified/missing/unexpected files, fetched over HTTPS only) scan_executable_files — Uploads-directory observations: PHP/executable files, .htaccess overrides, and symlinks (reported, never followed) audit_admin_accounts — Privileged-account facts: administrators with recency, admin capabilities outside the role, application-password counts, multisite super admins audit_cron — Bounded WP-Cron inventory with sub-60-second-schedule and unresolved-callback fact-flags audit_mcp_exposure — Which other MCP servers are registered on this site, and how many abilities pass the discovery rule such a server applies (abilities are registered site-wide, not per-plugin, so a server resolving targets from that registry picks up mutating ones outside SiteAgent’s approval path). The counts describe the abilities, not what any server currently serves. Reports only; changes nothing audit_rules — Whether a signed operator ruleset is present and how old it is, 24h block/warn counts, expired-but-listed rules, and the enforcement points in this build. Reports only; changes nothing get_seo_meta — Read a post/page’s SEO title, description, and focus keyword from the active SEO plugin (Rank Math, Yoast, or SEOPress) list_page_blocks — Read a page’s Gutenberg block structure (block names, attributes, nesting) Write tools (approval-gated): update_plugin_safely — Backup, update, health-check, auto-rollback on failure clear_caches — Flush object/opcode caches and detected page-cache plugins cleanup_transients — Remove expired transients to reduce autoload bloat cleanup_orphaned_assets — Find and remove unused media (dry-run by default) backup_plugins — Zip-snapshot one or all active plugins as a rollback safety net set_seo_meta — Write a post/page’s SEO title / description / focus keyword on the active SEO plugin (Rank Math, Yoast, or SEOPress) — on-site, so it works even when a WAF blocks the plugin’s own REST endpoint update_page_block — Update a Gutenberg block’s content or attributes (snapshot-first, reversible) create_page_from_blocks — Create a new page from a Gutenberg block spec (draft-first) Tools are classified by verb so the Aura Fleet gateway applies the right risk and approval policy automatically. Pro: the SiteAgent Power Pack Everything above is free and ships in this plugin. Agencies that need an agent to fix a site — not just report on it — can add the SiteAgent Power Pack, a separate companion plugin that registers higher-capability tools through this plugin’s own tool registry. It is not included in this download and is not distributed on WordPress.org — the tools it adds execute code, so they don’t belong in a hosted repository. It comes with the Aura Agency and Studio plans, or as SiteAgent Pro. What it adds: read_file — read a text file from inside wp-content (jailed; refuses wp-config.php). db_query — a single read-only SQL statement (SELECT / SHOW / EXPLAIN), row-capped. write_file — write a file inside wp-content, snapshot-first so it can be rolled back. run_wp_cli — run an allowlisted WP-CLI command, with no shell and no metacharacters. execute_php — run a PHP snippet against the full WordPress API. These are governed harder than anything in the free set, deliberately: Off until you arm them. The write and code tools do nothing until the site owner sets an explicit constant in wp-config.php for each one. Installing the Power Pack alone enables no writes and no code execution. Human approval, cryptographically enforced. Once the site holds Aura’s approval key (provisioned when you connect the site), each of these calls requires a single-use, signed grant bound to that exact tool and its exact parameters — one only the Aura dashboard can mint, after a human approves the action. A leaked Site Token cannot run them. (Until a site has that key, the gate is dormant — so connect the site from Aura before arming anything.) Reversible where it can be. File writes are snapshotted first, so there’s a previous state to restore. The safety model is governance, not a sandbox: execute_php is powerful by design. The controls are the constant you set, the human who approves the call, and the audit trail — not a promise that arbitrary code is safe. Learn more at my-aura.app/siteagent. About Aura Aura is a full-stack operations dashboard by Digitizer that brings servers, applications, DNS zones, and CDN pull zones from Cloudways, Hostinger VPS, Cloudflare, and Bunny.net into a single unified interface. SiteAgent extends that reach into every WordPress installation — so you can manage your entire infrastructure, including WordPress sites, from one place. Free to Use The plugin is completely free and open source (GPLv2+). You need a free or paid Aura account to connect your sites. Sign up at my-aura.app. Links Aura Dashboard Documentation GitHub Repository Digitizer