Add periodic health check email for abandoned plugins#94
Draft
apermo wants to merge 2 commits intoZodiac1978:developfrom
Draft
Add periodic health check email for abandoned plugins#94apermo wants to merge 2 commits intoZodiac1978:developfrom
apermo wants to merge 2 commits intoZodiac1978:developfrom
Conversation
apermo
commented
Apr 14, 2026
af84c21 to
bb7a1e9
Compare
apermo
commented
Apr 14, 2026
apermo
commented
Apr 14, 2026
apermo
commented
Apr 14, 2026
apermo
commented
Apr 14, 2026
f548133 to
3489df1
Compare
Schedule a daily WP-Cron event that checks all installed plugins for problems (closed, stale >2y, untested with current WP) and sends a summary email to the site admin. Deduplicates via hash comparison to avoid repeated emails for the same issue set. Clears the notification flag on plugin updates, activation/deactivation, and manual cache clear.
3489df1 to
00b1ca0
Compare
Extract health check into fully static RT_Plugin_Report_Health_Check class in includes/class-health-check.php. Small testable methods: is_closed(), is_stale(), is_untested(), collect_warnings(), build_email(), already_notified(). Schedule daily WP-Cron event. Deduplicates via hash to avoid repeated emails. Clears notification flag on plugin updates, activation/deactivation, and manual cache clear.
00b1ca0 to
51524ad
Compare
Contributor
Author
|
@Zodiac1978 I haven't tested this yet, but it looks good to me, will you take over from here if it fits your vision? |
Owner
|
I'm not sure how fast I can review this more deeply, but the described workflow looks fine to me. |
Contributor
Author
|
Just take your time :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugin_report_health_check_emailCloses #42
Architecture
Health check logic extracted into
RT_Plugin_Report_Health_Checkinincludes/class-health-check.php— single responsibility, small testable methods:is_closed( $report )— check if report indicates closed pluginis_stale( $report )— check if not updated in 2+ yearsis_untested( $report, $wp_latest )— check if not tested with current WPcollect_warnings()— iterate all plugins, return categorized warningsbuild_email( $warnings )— compose the email data arrayalready_notified( $warnings )— hash-based deduplicationclear_notification_flag()— reset on plugin changesCron hook registered outside
is_admin()so WP-Cron can fire it.Test plan (local, no Playground — email requires real wp_mail)
wp cron event list)wp cron event run plugin_report_health_check