WP Manifestindependent plugin directory
manifest / forms / lead-manager

Smart Lead Manager

Captures leads from frontend forms, stores them as CPT, and sends data to CRM via background tasks.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/alexphex/lead-manager/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin that captures leads from a frontend form, saves them as a custom post type, and syncs them to an external CRM in the background.

Built as a portfolio project to practice plugin architecture, REST API, and background processing in WordPress.

What it does

  • [lead_form] shortcode renders a contact form on any page
  • Form submits via Fetch API to a custom REST endpoint /agency-lead/v1/submit
  • Leads saved as CPT agency_lead with custom admin columns (name, email, status)
  • After saving — Action Scheduler queues a background HTTP request to external CRM
  • Admin gets an email notification for each new lead

Stack

  • PHP 8.2, OOP, type declarations
  • Vanilla JS, Fetch API
  • WP REST API
  • Action Scheduler
  • WordPress 6.7+

Setup

git clone https://github.com/alexphex/lead-manager.git wp-content/plugins/lead-manager

Install and activate Action Scheduler plugin. Activate Lead Manager. Add [lead_form] to any page.

A few notes

Nonce validation on the REST endpoint — requests without a valid nonce get a 403. Data is sanitized with sanitize_text_field() and sanitize_email() before hitting the database.

CRM sync runs via Action Scheduler so the form response is instant — the heavy HTTP request happens in the background a minute later.

Classes are autoloaded with spl_autoload_register() — no manual requires.