Developer documentation

OIntel v1.0.0

A comprehensive WordPress site intelligence and diagnostics dashboard — 0–100 health score, 25+ automated checks, historical snapshots, session tracking, and exportable reports. Entirely self-hosted.

WordPress plugin WP 6.0 · PHP 7.4+ GPL-2.0-or-later Released 2026-04-25
01 · Overview

What OIntel does

Unlike narrow tools like Query Monitor (developer-only) or WP Site Health (limited, no history), OIntel delivers a full intelligence layer — scores, history, alerts, and reports — with no external accounts required.

📊
0–100 Health Score
Weighted across 4 categories with grade A–F
🔍
25+ Automated Checks
Environment, plugins, performance, content
📷
Historical Snapshots
Point-in-time diffs — unique in the self-hosted space
Actionable Fix List
Ranked by score impact — highest first
🔔
Email + Slack Alerts
Critical issues, SSL expiry, score drops, plugin updates
👤
Session Intelligence
Active sessions, login history, admin activity log
📄
Exportable HTML Reports
Self-contained, print-ready, white-label option
🛡️
Vulnerability Scanning
WPVulnDB integration for installed plugins
⌨️
WP-CLI + REST API
Full automation support for headless workflows
🔒OIntel is entirely self-hosted — no SaaS subscription, no external accounts, no data leaves your server.
02 · Installation

Getting installed

Manual installation

1
Upload the ointel/ folder to /wp-content/plugins/.
2
Activate through Plugins → Installed Plugins.
3
Navigate to OIntel in the WP admin sidebar.
4
Click Run Scan on the Dashboard to generate your first health score.

Via WP-CLI

BASHwp plugin install ointel.zip --activate
wp ointel scan

On activation / deactivation / uninstall

EventWhat happens
ActivationCreates 5 custom database tables · Schedules background scan cron (daily) · Schedules weekly report email
DeactivationRemoves scheduled cron events · All data preserved (tables and options remain)
UninstallIf Remove on uninstall is enabled in Settings, all tables and options are permanently deleted
03 · Architecture

Plugin architecture

ointel/ ├── ointel.php Main plugin file, constants, hooks ├── admin/ │ ├── class-ointel-admin.php Admin class: menu, routing, AJAX, header │ ├── assets/ │ │ ├── ointel-admin-v2.css Orravo design system CSS (scoped) │ │ └── ointel-admin-v2.js Admin JavaScript │ └── views/ │ ├── view-dashboard.php Health score dashboard │ ├── view-environment.php Environment checks │ ├── view-plugins.php Plugin intelligence │ ├── view-performance.php Performance checks │ ├── view-content.php Content checks │ ├── view-snapshots.php Snapshot system │ ├── view-sessions.php Session intelligence │ ├── view-alerts.php Alert configuration │ ├── view-reports.php Report generation │ └── view-settings.php Plugin settings └── includes/ ├── class-ointel-db.php Database layer ├── class-ointel-checks.php All health check logic ├── class-ointel-health.php Score calculator ├── class-ointel-snapshot.php Snapshot management ├── class-ointel-sessions.php Session tracking ├── class-ointel-alerts.php Alert sending ├── class-ointel-reports.php HTML report generator ├── class-ointel-scanner.php Background scan scheduler ├── class-ointel-rest.php REST API endpoints └── class-ointel-cli.php WP-CLI commands
🔒Security principle: All checks are read-only. OIntel never writes to files, never modifies external DB tables, and never executes user-supplied code. All AJAX actions are nonce-verified and require manage_options.
04 · Admin Interface

Admin interface

Built on the Orravo Design System — scoped CSS tokens, dark/light toggle, 2-row sticky header. The WP sidebar is hidden on all plugin pages; navigation lives entirely within #ointel-wrap.

TabPurpose
DashboardHealth score ring, category breakdown, fix list, 30-scan score history chart
EnvironmentPHP, WP version, SSL, memory, disk, extensions, cron status
PluginsPlugin list, update status, vulnerability scan, orphaned tables
PerformanceTTFB, DB table sizes, autoload options, transients, revisions
ContentPosts without images, orphaned media, stale drafts, excerpts, content counts
SnapshotsTake / delete snapshots, compare two snapshots side-by-side
SessionsActive sessions, login history, admin activity log
AlertsEmail/Slack alert configuration, alert log
ReportsGenerate & download HTML report, scan history
SettingsAll plugin settings
05 · Health Score System

How the score works

A weighted 0–100 score computed across four categories. Within each category, base score starts at 100 and deductions are applied per failing check.

Environment
30%
Plugins
25%
Performance
25%
Content
20%

Deduction scale

StatusBase deduction
Critical20 pts (or score_impact, whichever is higher). Category floor: 0.
Warning8 pts (or score_impact, whichever is higher)
Info0 pts — informational only
OK0 pts — passing check

Grade scale

GradeScore range
A90 – 100
B80 – 89
C70 – 79
D60 – 69
F0 – 59

Fix list & score history

The Top Items to Fix panel ranks actionable items (critical + warning) by severity first, then score_impact descending. Up to 5 items shown with estimated gain if resolved.

Every background scan stores the health score with a timestamp. The Dashboard shows a line chart of the last 30 scans for trend tracking.

06 · Check Categories

All 28+ checks

Environment (15+ checks)

Check IDLabelMax deduction
php_versionPHP Version10 pts
wp_versionWordPress Version5 pts
wp_debugWP Debug Mode5 pts
sslHTTPS / SSL15 pts
ssl_expirySSL Certificate Expiry10 pts
memory_limitPHP Memory Limit8 pts
max_execMax Execution Time3 pts
rest_apiREST API8 pts
wp_cronWP-Cron0 pts (info)
admin_emailAdmin Email4 pts
mysql_versionMySQL / MariaDB Version4 pts
wpconfig_permswp-config.php Permissions5 pts
disk_spaceDisk Space10 pts
php_ext_requiredRequired PHP Extensions8 pts
php_ext_recommendedRecommended PHP Extensions0 pts (info)
multisiteMultisite Detection0 pts (info)

Plugin intelligence

Check IDLabelMax deduction
plugin_updatesPlugin Updates Available12 pts
stale_pluginsStale Plugins (2+ years)8 pts
inactive_pluginsInactive Plugins0 pts (info)
vulnerabilitiesKnown Vulnerabilities20 pts
orphaned_tablesOrphaned DB Tables0 pts (info)
ℹ️Vulnerability scanning requires a WPScan API key (free tier at wpscan.com). Results are cached for 24 hours.

Performance checks

Check IDLabelMax deduction
ttfbServer Response Time (TTFB)8 pts
autoloadAutoloaded Options Size12 pts
expired_transientsExpired Transients6 pts
revisionsPost Revisions6 pts
db_sizeTotal Database Size0 pts (info)
db_overheadDatabase Table Overhead3 pts
object_cacheObject Cache0 pts (info)
uploads_sizeUploads Directory Size0 pts (info)

Content checks

Check IDLabelMax deduction
no_featured_imagePosts Without Featured Images0 pts (info)
orphaned_mediaOrphaned Media0 pts (info)
stale_draftsStale Drafts (6+ months)0 pts (info)
no_excerptPosts Without Excerpts0 pts (info)
content_countPublished Content0 pts (info)
user_countRegistered Users0 pts (info)
07 · Snapshot System

Point-in-time snapshots

Each snapshot captures a full site state diff — WordPress version, PHP, theme, every plugin with version, post/user counts, DB size, memory, health score, and all check results. Stored as compressed JSON in wp_ointel_snapshots.

Taking snapshots

MethodHow
ManualDashboard → Snapshots tab → Take Snapshot → optionally label it → Save
AutomaticEnable Automatic daily snapshots in Settings — runs via WP-Cron
WP-CLIwp ointel snapshot "Before plugin update"

Diff comparison

Select any two snapshots from the dropdown selectors and click Compare. OIntel performs a field-by-field diff and returns: score delta, changed fields with before/after values, highlighted plugin version changes and active plugin count differences.

Retention

The Keep Last N Snapshots setting (default: 30, max: 100) automatically prunes older snapshots after each new one is taken.

08 · Session Intelligence

Session intelligence

When Track Sessions is enabled, OIntel hooks into WP's session system to log active sessions, login events, and admin activity.

Data trackedFields stored
Active sessionsUser ID, session token, IP address, user agent, last activity (shows sessions active in last 30 min)
Successful loginsUser ID, username, IP, timestamp
Failed login attemptsAttempted username, IP, timestamp
Admin activityUser ID, action key, object, IP, timestamp — every admin page view and form submission
⚠️Privacy note: IP addresses are stored in your own database. Ensure your privacy policy reflects this if you operate in GDPR jurisdictions. Old sessions are auto-purged after 7 days; manual purge is available via Purge Old Sessions.
09 · Alerts & Notifications

Alerts & notifications

Alert conditions

ConditionTrigger
New critical issueAny scan produces a Critical check result
Score dropHealth score drops by ≥ N points (configurable threshold, default 10)
SSL expirySSL certificate expiring within 30 days
Plugin updatesAny plugin has a pending update

Channels

Email: Sends an HTML email to the configured alert address with a View Dashboard CTA button.

Slack: Enter an Incoming Webhook URL from your Slack app settings. All alert conditions also post to Slack when a webhook is configured.

Weekly report: Enable Weekly Summary Report to receive a full HTML report every Monday at 08:00, including health score, all check results, and the fix list.

Alert log & testing

All sent alerts are recorded in wp_ointel_alert_log with type, channel, recipient, status, and timestamp. Click Send Test Alert on the Alerts tab to verify email/Slack configuration without triggering a real scan.

10 · Reports

HTML reports

Fully self-contained, print-ready HTML exports. No external dependencies — works offline.

Report contents

  • Site name, URL, and report date
  • Health score ring with letter grade (A–F)
  • Critical / Warning / Info / OK counts
  • Top 5 items to fix with estimated score impact
  • Full check results grouped by category

Export: Reports → Export HTML Report → preview in iframe → Download HTML or Print / Save PDF via the browser print dialog.

White-label reports

Enable White-Label Reports in Settings to remove OIntel footer branding. Optionally supply a custom logo URL that appears at the top of exported reports. Designed for agencies delivering monthly health reports to clients.

WP-CLI export

BASHwp ointel report --file=/tmp/site-report.html
11 · Background Scanner

Background scanner

OIntel uses WP-Cron to run health scans automatically. Configure the frequency in Settings.

What the scanner does

1
Runs all health checks via OIntel_Checks::run_all().
2
Calculates the health score via OIntel_Health::calculate().
3
Stores the result in wp_ointel_scan_log.
4
Caches the last scan result in a transient (6-hour TTL).
5
Updates the admin bar critical count transient.
6
Evaluates and fires configured alerts.

Frequency & modes

OptionCron key
Hourlyointel_hourly
Daily (default)ointel_daily
Weeklyointel_weekly

Lightweight Mode skips TTFB measurement and the WPVulnDB API call — recommended for resource-constrained hosting environments.

Manual trigger: Dashboard → Run Scan button calls OIntel_Scanner::run_manual() via AJAX.

12 · REST API

REST API endpoints

Base namespace: ointel/v1. All endpoints require manage_options capability unless Allow public REST is enabled in Settings.

GET /wp-json/ointel/v1/health-score

Returns the health score from the most recent scan.

JSON{
  "score":   87,
  "grade":   "B",
  "critical": 0,
  "warning":  3,
  "scanned": "2026-04-25 09:14:00"
}

GET /wp-json/ointel/v1/checks

Returns all check results from the last scan. Filter by ?status=critical|warning|info|ok.

JSON{
  "checks": [
    {
      "id":           "ssl",
      "category":     "Environment",
      "label":        "HTTPS / SSL",
      "status":       "ok",
      "message":      "HTTPS active",
      "detail":       "Site is served over HTTPS.",
      "score_impact": 0
    }
  ],
  "total": 28
}

GET /wp-json/ointel/v1/snapshots

Returns snapshot history. Query param: ?limit=10 (max 50).

POST /wp-json/ointel/v1/scan

Triggers a fresh scan. Requires manage_options.

JSON{
  "scan_id":  42,
  "score":    87,
  "critical": 0,
  "warning":  3,
  "duration": 1240,
  "checks":   28
}
13 · WP-CLI Commands

WP-CLI commands

All commands are under the wp ointel namespace.

wp ointel scan

Run a full health scan.

BASHwp ointel scan
wp ointel scan --format=json   # also supports: table (default), yaml
OUTPUT+----------+--------+
| Field    | Value  |
+----------+--------+
| Score    | 87/100 |
| Critical | 0      |
| Warnings | 3      |
| Checks   | 28     |
| Duration | 1240ms |
| Scan ID  | 42     |
+----------+--------+

wp ointel snapshot

BASHwp ointel snapshot                        # no label
wp ointel snapshot "Before plugin update"  # with label

wp ointel report

BASHwp ointel report                         # stdout
wp ointel report --file=/tmp/report.html  # write to file

wp ointel snapshots

BASHwp ointel snapshots
wp ointel snapshots --limit=20
14 · Developer Hooks & Filters

Filters & actions

ointel_checks

Add, remove, or modify checks in the health engine.

PHPadd_filter( 'ointel_checks', function( array $checks ): array {
    $checks[] = [
        'id'           => 'my_custom_check',
        'category'     => 'Environment',
        'label'        => 'My Custom Check',
        'status'       => 'ok',   // critical | warning | info | ok
        'message'      => 'Everything looks good.',
        'detail'       => 'Optional additional detail.',
        'score_impact' => 0,
    ];
    return $checks;
} );

ointel_snapshot_data

Add custom data fields to every snapshot.

PHPadd_filter( 'ointel_snapshot_data', function( array $data ): array {
    $data['woocommerce_product_count'] = wp_count_posts( 'product' )->publish ?? 0;
    return $data;
} );

ointel_alert_conditions

Add custom alert conditions that fire after every scan. The message key is a callable that receives the current checks array and health data.

PHPadd_filter( 'ointel_alert_conditions', function( array $conditions ): array {
    $conditions[] = [
        'type'    => 'my_custom_alert',
        'message' => function( array $checks, array $health ): string {
            return 'My custom alert triggered. Score: ' . $health['score'];
        },
    ];
    return $conditions;
} );
ℹ️Custom should_fire logic is not called automatically — you must hook into ointel_alert_conditions and handle firing by calling OIntel_Alerts::evaluate() or OIntel_DB::insert_alert() directly.

ointel_report_sections

Add custom sections to HTML reports.

PHPadd_filter( 'ointel_report_sections', function( array $sections ): array {
    $sections[] = [
        'title'  => 'WooCommerce Checks',
        'checks' => [
            [
                'label'   => 'Products',
                'status'  => 'ok',
                'message' => '142 published products',
                'detail'  => '',
            ],
        ],
    ];
    return $sections;
} );
15 · Database Tables

Database tables

All table names are prefixed with the WordPress table prefix ($wpdb->prefix). Five tables created on activation.

ointel_snapshots

ColumnTypeDescription
idBIGINT UNSIGNEDPrimary key
labelVARCHAR(200)Human-readable label
typeVARCHAR(20)manual or auto
scoreTINYINT UNSIGNEDHealth score at snapshot time
data_jsonLONGTEXTJSON blob of site state data
issues_jsonLONGTEXTJSON blob of check results
created_atDATETIMESnapshot timestamp

ointel_scan_log

ColumnTypeDescription
idBIGINT UNSIGNEDPrimary key
started_atDATETIMEWhen scan started
duration_msINT UNSIGNEDScan duration in milliseconds
scoreTINYINT UNSIGNEDHealth score
issues_criticalSMALLINT UNSIGNEDCount of critical issues
issues_warningSMALLINT UNSIGNEDCount of warnings
issues_infoSMALLINT UNSIGNEDCount of info items
issues_okSMALLINT UNSIGNEDCount of passing checks
results_jsonLONGTEXTFull check results JSON
triggered_byVARCHAR(20)manual, cron, cli, rest

ointel_alert_log

ColumnTypeDescription
idBIGINT UNSIGNEDPrimary key
typeVARCHAR(50)Alert type key
channelVARCHAR(20)email or slack
messageTEXTAlert message body
recipientsTEXTEmail address(es) or Slack channel
statusVARCHAR(20)sent or failed
sent_atDATETIMEWhen alert was sent

ointel_sessions & ointel_activity_log

TableKey columns
ointel_sessionsuser_id, session_token, ip, user_agent, last_activity, created_at
ointel_activity_loguser_id, action (e.g. login, login_failed), object, ip, created_at
16 · Settings Reference

Settings reference

All settings stored in wp_options under key ointel_settings.

KeyTypeDefaultDescription
scan_frequencystringointel_dailyCron schedule: ointel_hourly, ointel_daily, ointel_weekly
snapshot_keepint30Number of snapshots to retain (max 100)
auto_snapshotboolfalseTake automatic daily snapshots
lightweight_modeboolfalseSkip TTFB and vulnerability checks
track_sessionsboolfalseEnable session + activity tracking
adminbar_badgeboolfalseShow critical count badge in admin bar
alert_email_enabledboolfalseEnable email alerts
alert_emailstringadmin emailAlert recipient address
alert_new_criticalboolfalseAlert on new critical issues
alert_score_dropboolfalseAlert on score drop
score_drop_thresholdint10Minimum drop in points to trigger alert
alert_sslboolfalseAlert on SSL expiry warning
alert_plugin_updatesboolfalseAlert on available plugin updates
slack_webhookstringSlack incoming webhook URL
weekly_reportboolfalseSend weekly HTML report email
white_labelboolfalseRemove OIntel branding from reports
white_label_logostringCustom logo URL for white-label reports
wpvulndb_api_keystringWPScan API token for vulnerability checks
rest_publicboolfalseAllow unauthenticated REST access to health-score
remove_on_uninstallboolfalseDelete all data on plugin uninstall
17 · Competitor Comparison

How OIntel stacks up

FeatureOIntelQuery MonitorWP Site HealthGoogle Site Kit
Health score (0–100)
Historical snapshots
Snapshot diff
Actionable recommendationsLimited
Plugin vulnerability scan
Email alerts
Slack alerts
Exportable HTML/PDF report
White-label reports
Session tracking
REST API
WP-CLI
No external account
Self-hosted
Developer-friendly hooksLimited
18 · Pricing Model

Plans & pricing

Free
$0
forever
  • Full health dashboard & all check categories
  • Environment, plugin, performance & content checks
  • Snapshot system (last 5 retained)
  • Email alerts (basic)
  • HTML report export
Agency
$59/yr
25 sites
  • All Pro features
  • Centralised multi-site scanning via REST API
  • Agency dashboard (roadmap)
19 · Security Model

Security model

OIntel is built on a strict read-only principle — it inspects your site, never modifies it.

#PrincipleHow it's enforced
1No file writesOIntel never writes to the filesystem outside its own database tables
2No code executionUser input is never evaluated or executed
3Admin-onlyAll AJAX actions, REST writes, and admin pages require manage_options
4Nonce verificationEvery AJAX action verifies a WordPress nonce
5Input sanitizationAll user input sanitized before storage
6Output escapingAll output uses esc_html(), esc_attr(), esc_url() appropriately
7External requestsOnly TTFB measurement (internal) and optional WPVulnDB API call. All use wp_remote_get() with timeouts
8SQL safetyAll database queries use $wpdb->prepare() with placeholders
20 · Changelog

What's shipped

v1.0.0 Initial release · 2026-04-25
  • Health score dashboard (0–100, 4 categories, 28+ checks)
  • Score history chart (last 30 scans)
  • Prioritised fix list ranked by score impact
  • Environment checks: PHP, WP, SSL, SSL expiry, memory, max_exec, REST API, WP-Cron, admin email, MySQL, file permissions, disk space, PHP extensions, multisite
  • Plugin intelligence: updates, stale, vulnerability scan (WPVulnDB), orphaned tables
  • Performance checks: TTFB, autoload options, expired transients, revisions, DB table sizes, object cache, uploads size
  • Content checks: featured images, orphaned media, stale drafts, excerpts, content counts, user counts
  • Snapshot system: manual + auto, 30-snapshot history, field-by-field diff comparison
  • Session intelligence: active sessions, login tracking, admin activity log
  • Email alerts: critical issues, score drop, SSL expiry, plugin updates
  • Slack webhook alerts
  • Admin bar badge (critical count)
  • HTML report export with white-label option
  • Weekly scheduled report email
  • Background scan scheduler (hourly/daily/weekly, lightweight mode)
  • REST API: health-score, checks, snapshots, scan endpoints
  • WP-CLI: scan, snapshot, report, snapshots commands
  • Developer filters: ointel_checks, ointel_snapshot_data, ointel_alert_conditions, ointel_report_sections
  • Clean install/uninstall hooks with optional data removal
  • Full rebrand from fsi_/FSI_ to ointel_/OINTEL_
  • Orravo design system UI (dark/light, top-nav, scoped CSS tokens)
✦ Need help?

Got a question about OIntel?

Reach out directly — Kenneth replies within 24 hours.