Penalis Publish Validator WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
A WP plugin that prevents incomplete articles from being published accidentally.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/erlandv/penalis-publish-validator/releases/download/v1.1.0/penalis-publish-validator-1.1.0.zipA WordPress plugin that prevents incomplete articles from being published accidentally. It enforces editorial completeness requirements—such as title, featured image, categories, tags, and post author—via native Gutenberg block editor integrations as well as server-side validation.
This plugin was originally developed for internal use at Penalis. It is publicly available so others can use it in their own projects if they find it useful.
Key Features
- Real-Time Editorial Checklist: An interactive widget in the Document sidebar inside the Gutenberg Block Editor displaying validation status live as the article is written.
- Pre-Publish Review Panel: Summary of article completeness before final publish confirmation.
- Editor State Synchronization: Automatically resets local editor status to draft if a publish attempt fails, preventing misleading status displays.
- Server-Side Safety Net: Protects post save/publish operations via
wp_insert_post_dataandrest_pre_insert_posthooks to prevent bypasses via REST API, XML-RPC, or programmatic requests. - Flexible Validation Rules:
- Title Presence: Ensures article title is provided.
- Featured Image: Ensures a featured image has been selected.
- Categories: Ensures at least one real category (excluding default "Uncategorized") is selected.
- Tags: Ensures at least one tag is added.
- Excluded Authors: Prevents publishing under specific admin or default user accounts.
- Admin Settings Page: Allows site administrators to toggle individual validation rules and manage the list of excluded authors.
- Workflow Friendly: Does not block saving drafts, autosaving, previewing, or review workflows.
System Requirements
- WordPress: v6.3 or higher (Tested up to v6.8)
- PHP: v8.0 or higher
- Node.js & npm (optional, required only for building JS/CSS assets)
Installation
- Download the latest ZIP from the Releases page
- In WordPress admin, go to Plugins → Add New → Upload Plugin
- Upload the ZIP and click Install Now, then Activate
- Go to Settings → Publish Validator to configure
Configuration
Once activated, administrators can configure validation options via: WordPress Dashboard → Settings → Publish Validator
In this panel, you can:
- Enable or disable individual validation rules (Title, Featured Image, Category, Tags, Excluded Author).
- Specify WordPress usernames or User IDs that are restricted from being the final post author.
Development
This plugin utilizes @wordpress/scripts for compiling and bundling TypeScript/TSX and CSS for the Gutenberg Editor. The frontend source (src/editor/) is written in TypeScript with strict mode enabled.
NPM Commands
Run the following commands inside the plugin root directory:
# Install Dependencies:
npm install
# Production Build:
npm run build
# Start Development (Watch Mode):
npm run start
# Type Check (TypeScript, no emit):
npm run type-check
# Lint JavaScript/TypeScript:
npm run lint:js
# Lint CSS/Styles:
npm run lint:css
Project Structure
penalis-publish-validator/
├── build/ # Compiled JS & CSS bundle (generated by wp-scripts)
├── includes/ # Backend PHP code & server-side validation logic
│ ├── class-plugin.php # Main plugin class & asset registration
│ ├── class-post-hooks.php # Server-side validation hooks (REST API & wp_insert_post)
│ ├── class-settings.php # Admin settings page logic & UI
│ └── class-validator.php # Core validation engine & rule definitions (Penalis_Rule)
├── src/ # Frontend source code (Gutenberg integration)
│ └── editor/
│ ├── components/ # React/TSX components (Checklist & PrePublish Panel)
│ ├── hooks/ # Custom React hooks for Gutenberg Store
│ ├── types/ # TypeScript type definitions & ambient declarations
│ ├── index.tsx # Entry point for Gutenberg plugin
│ └── style.css # Styles for sidebar & validation panel
├── LICENSE.txt # GPLv2 License
├── package.json # npm dependencies & build scripts
├── penalis-publish-validator.php # Main WordPress plugin header file
├── readme.txt # Standard WordPress.org plugin readme
├── tsconfig.json # TypeScript compiler configuration
├── webpack.config.js # Custom Webpack configuration
└── README.md # Main repository documentation
License
This plugin is open-source software licensed under the GPLv2 or later.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.