CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Add pre-update simulation, reporting, and export features #3832

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/check-build-status-7CWRzmainopened Apr 16, 2026
ccantynzcommented Apr 16, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/Intelligent-Plugin-Conflict-Detector/pull/4


Summary

This PR introduces three major feature sets to Jetstrike Conflict Detector: pre-update simulation that analyzes new plugin versions before applying updates, professional report generation for agencies, and data export/import capabilities for sharing conflict profiles across sites.

Key Changes

Pre-Update Analysis (PreUpdateAnalyzer.php)

  • Downloads new plugin versions from WordPress.org and extracts them to temporary directories
  • Runs static analysis on the new code before the update is applied
  • Compares conflicts before/after to identify new issues that would be introduced
  • Calculates risk scores and generates summaries of breaking changes
  • Includes quick pre-update checks using WordPress.org API data (PHP/WP version requirements, major version jumps, cloud intelligence)
  • Detects code changes between current and new versions

Report Generation (ReportGenerator.php)

  • Generates professional, self-contained HTML reports for agencies and clients
  • Includes site health scores with letter grades (A-F)
  • Displays conflict summaries with severity breakdowns
  • Shows active plugins with version and conflict counts
  • Provides plugin compatibility matrix visualization
  • Includes scan history timeline and actionable next steps
  • Generates downloadable reports with consistent styling

Export/Import Manager (ExportManager.php)

  • Exports site conflict data as portable JSON with format versioning
  • Includes site metadata (WordPress version, PHP version, plugin count)
  • Supports selective export (scans, resolved conflicts)
  • Imports conflict profiles from other sites with duplicate detection
  • Enables conflict profile comparison across multiple client sites
  • Includes merge options and comprehensive error handling

Compatibility Matrix (CompatibilityMatrix.php)

  • Generates interactive heat map of plugin-to-plugin compatibility
  • Creates visual grid showing compatibility status between all active plugin pairs
  • Color-coded cells: green (compatible), yellow (minor issues), red (critical), gray (untested)
  • Includes statistics on total pairs, compatible, and conflicting combinations
  • Renders as HTML table with hover effects and legend

Multisite Support (NetworkScanner.php)

  • Scans across all sites in WordPress Multisite networks (agency tier feature)
  • Provides network-wide overview of plugin conflicts
  • Shows which sites have issues and which plugins cause the most problems
  • Includes per-site conflict summaries and health grades
  • Supports network plugin statistics

Auto-Fix Beta Gating (AutoResolver.php)

  • Adds explicit beta opt-in mechanism for Auto-Fix Engine
  • Requires either JETSTRIKE_CD_AUTOFIX_ENABLED constant or settings toggle
  • Protects users from accidentally writing mu-plugin files during beta period
  • Returns clear error message when beta is disabled

Admin Integration (AdminAjax.php, admin-dashboard.js)

  • New AJAX endpoints for report generation, data export/import, and pre-update checks
  • Toolbar buttons for generating reports, exporting data, and toggling compatibility matrix
  • JavaScript handlers for report generation with download support
  • Data export with filename generation and statistics

UI/Styling (admin-dashboard.css)

  • Comprehensive styling for compatibility matrix (heat map colors, hover effects, legend)
  • Matrix table layout with rotated headers and scrollable container
  • Color-coded severity indicators matching conflict severity levels

Documentation

  • Updated readme.txt with clearer value proposition and feature descriptions
  • Added sample HTML report template showing professional output format
  • Updated CLAUDE.md project structure documentation

Notable Implementation Details

  • Pre-update analysis uses temporary directories with automatic cleanup to avoid modifying live plugin code
  • Risk scoring algorithm combines conflict count, severity, and type to produce actionable scores
  • Export format includes version number for forward compatibility
  • Compatibility matrix uses pair-key lookup for efficient conflict mapping
  • Network scanner respects multisite blog switching with proper restoration
  • All new features include proper capability checks and nonce verification

https://claude.ai/code/session_018BQd9Gz92n9s9KPibYMdfF

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts