Skip to content

IILLC/wp-activity-keyword-reports-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Activity Keyword Reports Demo

A focused demonstration of a reusable moderation/reporting pattern for WordPress-based community platforms.

Overview

This plugin scans user-generated content for configured keywords, stores matching results, and provides reporting and alerting tools for administrators.

The current implementation focuses on BuddyPress / BuddyBoss activity streams, but the architecture is designed to demonstrate a broader moderation pattern that can be applied to other content sources.

Screenshot

What This Demonstrates

This repository is intended as a focused example of:

  • WordPress plugin architecture
  • keyword-based content scanning
  • scheduled background processing with WP-Cron
  • custom database tables with dbDelta()
  • structured reporting workflows
  • admin UI using the WordPress Settings API
  • HTML email alert generation
  • clean separation of concerns

Demo Scenario

This demo models a common moderation requirement:

  • administrators define a list of sensitive keywords
  • the system scans user-generated content on a schedule
  • matching content is stored in a reporting table
  • admins can review matches in the dashboard
  • email alerts are sent when matches are found

Implementation Scope

This example focuses on a single content source:

  • BuddyPress / BuddyBoss activity (wp_bp_activity)

This keeps the code easy to review while demonstrating a pattern that could be extended to:

  • comments
  • forum posts
  • custom post types
  • external APIs

Features

  • configurable keyword list
  • scheduled scanning with WP-Cron
  • custom report storage table
  • admin dashboard summary
  • date-filtered report view
  • HTML email alerts
  • manual scan trigger via settings save
  • optional data cleanup on uninstall

Technical Notes

This repository was refactored from a production moderation/reporting system into a standalone example.

It intentionally:

  • removes site-specific business logic and data
  • simplifies configuration to essential features
  • focuses on clarity over completeness
  • demonstrates patterns rather than full product functionality

File Structure

wp-activity-keyword-reports-demo.php
includes/
  class-iillc-akr-plugin.php
  class-iillc-akr-repository.php
  class-iillc-akr-scanner.php
  class-iillc-akr-report-renderer.php
  class-iillc-akr-emailer.php
  class-iillc-akr-admin.php
  class-iillc-akr-activator.php
assets/
  css/admin.css
uninstall.php

Installation

  1. Install WordPress
  2. Install BuddyPress or BuddyBoss if you want live activity data to scan
  3. Copy the plugin into wp-content/plugins/
  4. Activate the plugin
  5. Go to Keyword Alerts → Settings
  6. Configure keywords and frequency
  7. Save settings and optionally run a scan immediately

Example Keywords

danger, violence, abuse, suicide

Naming Convention

This project uses the iillc_ / IILLC_ prefix for functions, classes, and constants.

This reflects my production practice of:

  • preventing naming collisions
  • identifying authored code quickly
  • maintaining consistency across large WordPress systems

Scope

This is a portfolio demonstration, not a full moderation system.

It intentionally excludes:

  • phrase matching
  • scoring or prioritization
  • workflow tools
  • moderation queues
  • machine learning or NLP
  • multi-source scanning abstraction

Why This Repo Exists

Most of my work involves building custom moderation and reporting logic inside live WordPress systems.

This repository extracts one of those patterns into a clean, standalone example that is easier for technical reviewers to evaluate.

Notes for Reviewers

  • The plugin fails gracefully if activity tables are not present
  • The scanning logic is intentionally simple and uses exact keyword matching
  • The architecture is designed for clarity and extension
  • This demo uses exact single-word matching and intentionally does not include stemming, phrase matching, or context analysis.

License

MIT

About

WordPress plugin demonstrating a keyword-based moderation and reporting system using scheduled scanning, custom tables, and admin reporting UI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors