A WordPress plugin for tracking contributor activity and visualizing engagement across progression ladders.
The plugin uses a three-tier data model where each layer caches the computation of the previous:
Events (raw data)
↓ profile generation
Profiles (aggregated per-user)
↓ wpcd_profiles_generated action
Dashboard HTML (pre-rendered, cached)
Raw activity records stored in wp_contributor_events. Each event has:
event_id— Unique identifier (for deduplication)contributor_id— Usernameevent_type— Activity typeevent_created_date— When it occurred
Events are immutable once imported. New event types are auto-created during import.
Aggregated data per contributor in wp_contributor_profiles. Computed from events via WP-Cron batches:
- Event counts by type
- Current ladder stage
- Activity status (active/warning/inactive)
- Ladder journey history
Profile generation runs asynchronously. When complete, fires wpcd_profiles_generated.
The complete frontend HTML (including CSS) is pre-generated and stored in wp_options as a single cache entry (wpcd_dashboard_cache).
Cache is regenerated only when wpcd_profiles_generated fires. Frontend requests serve the cached HTML directly — no database queries on page load.
- Active — Last activity within 30 days
- Warning — Last activity 30-90 days ago
- Inactive — No activity for 90+ days
Status is calculated during profile generation relative to the reference date (the newest event date), not "today". This handles delayed imports correctly in case we take more time to import new events.
All time-based calculations use wpcd_reference_date (stored in wp_options) instead of the current date. This is set automatically from MAX(event_created_date) when profile generation starts.
This ensures that if you import December events in January, the status calculations use December as "now", not January.
event_id,contributor_id,contributor_registered,event_type,event_date
987654321123,1234567,2024-01-15,support_reply,2024-06-20
This is the CSV format provided by Dion (Make/Meta), so using this as base for all importing.
wpcd_profiles_generated— Fires after profile generation completes