A lightweight contact form plugin for WordPress that uses blocks.
- Node.js (v14 or later)
- npm (v6 or later)
- Clone this repository
- Run
npm installto install dependencies
npm run start- Start development mode for block editor assetsnpm run build- Build block editor assets for productionnpm run build:frontend- Build frontend assets (minified JS)npm run watch:frontend- Watch and build frontend assetsnpm run build:all- Build both block editor and frontend assets
assets/- Source files for frontend assetsfrontend/js/- Frontend JavaScript filesfrontend/css/- Frontend CSS files
src/- Source files for block editordist/- Compiled and minified assetsincludes/- PHP classes and functionsblocks/- Block definitions and templates
The plugin is optimized to:
- Load JavaScript files only on pages where forms are present
- Load block editor dependencies only in the admin area
- Load field-specific assets (like datepicker) only when those fields are used
- Minify all frontend JavaScript files
Important plugin settings that affect performance:
- "Load plugin assets globally" - Only enable if using forms with page builders
- "Load default styling for forms" - Can be disabled if your theme handles form styling
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request