Files
wp-healthcheck/site-healthcheck.php
Steve Hanlon 8de7cad0de Phase 1 MVP: drop-in step registry + session + Markdown report
Plugin skeleton, drop-in step registry, option-backed session, single-page
checklist UI, downloadable Markdown report. Steps live as one file each
under includes/steps/ — adding/removing one is a single file change.
Step IDs are stable strings so renaming files preserves session data.

Architecture (hc-5ix.3): WPH_Steps singleton globs includes/steps/*.php,
natsort-orders by filename, requires each file (which returns a WPH_Step
instance), then applies a 'wph_steps' filter so installs can drop steps.

Session (hc-5ix.4): option-backed (per decision — plugin is installed
per-engagement, so DB-resident history would be lost on uninstall).
Single in-progress session per site; finished sessions render a report
that the user downloads/copies.

Recovery bootstrap (hc-5ix.1): detects whether wp-site-recovery is
installed + active, surfaces state on the start panel and in every
active session. Manual install for now; private update channel deferred
to hc-5ix.27.

Smoke-tested on testsite: registry discovery (13 steps in correct order),
start → update_step → progress count → finish → 8KB Markdown report →
discard cycle.
2026-06-11 15:49:29 +01:00

33 lines
1.1 KiB
PHP

<?php
/**
* Plugin Name: Site Healthcheck
* Description: Walks a technician through a structured WordPress site healthcheck. Steps are drop-in PHP files so adding/removing one is a single file change.
* Version: 0.1.0
* Author: Steve Hanlon
* License: GPL-2.0-or-later
* Requires PHP: 7.4
*
* Internal/agency tool — not distributed via WP.org. See beads decision hc-5ix.26.
*/
if (!defined('ABSPATH')) {
exit;
}
define('WPH_VERSION', '0.1.0');
define('WPH_PLUGIN_FILE', __FILE__);
define('WPH_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WPH_PLUGIN_URL', plugin_dir_url(__FILE__));
define('WPH_OPT_SESSION', 'wph_session');
require_once WPH_PLUGIN_DIR . 'includes/class-wph-step.php';
require_once WPH_PLUGIN_DIR . 'includes/class-wph-steps.php';
require_once WPH_PLUGIN_DIR . 'includes/class-wph-session.php';
require_once WPH_PLUGIN_DIR . 'includes/recovery-bootstrap.php';
require_once WPH_PLUGIN_DIR . 'includes/admin-page.php';
require_once WPH_PLUGIN_DIR . 'includes/report.php';
add_action('plugins_loaded', function () {
WPH_Steps::instance()->discover(WPH_PLUGIN_DIR . 'includes/steps/');
});