=== Sentinel - WordPress Activity Logger ===
Contributors: jpsnt
Tags: logging, monitoring, security, activity, audit, tracking
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sentinel is a comprehensive activity logger for WordPress that goes beyond basic logging. Track user actions, detect security incidents, monitor system performance, and view detailed reports—all without hitting a paywall.

== Description ==

Sentinel is a powerful WordPress activity logging and monitoring plugin designed to provide comprehensive visibility into your website's activities. Whether you're running a community site, e-commerce platform, or corporate website, Sentinel helps you track, monitor, and analyze user actions and system events.

== Key Features ==

* Comprehensive logging – Track user logins, content changes, admin actions, and system events
* Real-time monitoring – View events as they happen with detailed data
* Security focus – Detect suspicious activities, failed login attempts, and system changes
* Performance optimized – Efficient batch processing and automatic cleanup
* Developer friendly – Easy API for extending functionality
* Admin interface – Clean, intuitive UI for reviewing logs
* Export capabilities – Download logs for compliance or analysis
* Customizable – Control event types and log retention policies

== Use Cases ==

* Community sites – Monitor user engagement, moderation actions, and profile changes
* E-commerce – Track order updates, inventory edits, and customer account changes
* Corporate sites – Maintain audit trails for compliance and internal oversight
* Multi-author blogs – View editorial activity, publishing logs, and content revisions
* Security monitoring – Detect brute force attempts, privilege escalations, and plugin changes

== Technical Features ==

* WordPress coding standards compliant
* Hooks and filters for extensibility
* Optimized database queries with proper indexing
* Automatic log rotation and cleanup
* REST API support for external integrations
* Multisite compatible

== Installation ==

1. Upload the `sentinel` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Configure the plugin settings in the 'Sentinel' admin menu
4. Start monitoring your site's activities

== Frequently Asked Questions ==

= What events does Sentinel log by default? =

Sentinel logs a wide range of events including:
- User authentication (login, logout, failed attempts)
- Content creation, editing, and deletion
- Admin actions and system changes
- Plugin and theme activations
- Media uploads and changes
- Custom events via API

= How does Sentinel handle performance? =

Sentinel is designed with performance in mind:
- Batch processing for high-volume events
- Efficient database queries with proper indexing
- Automatic cleanup of old logs
- Configurable retention policies
- Minimal impact on site performance

= Can I add custom events? =

Custom event registration is available in Sentinel Pro.

= Is Sentinel compatible with multisite? =

Yes, Sentinel is fully compatible with WordPress multisite installations and can be network-activated.

== Screenshots ==

1. Main admin dashboard showing recent activities
2. Detailed log viewer with filtering options
3. Settings page for configuration
4. Export functionality for external analysis

== Changelog ==

= 1.1.2 =
* Fix: Email notification flood — added rate limiter to both security alert and granular notification pathways
* Per-event-key cooldown: same event type can only trigger one email per 30 minutes (configurable)
* Global hourly cap: maximum 5 notification emails per hour (configurable)
* Rate limits use lightweight transients — no extra database tables or dependencies
* Configurable via sentinel_security_settings: email_per_event_cooldown (seconds) and email_hourly_cap (count)

= 1.1.1 =
* Deterministic activation: all cron events scheduled with consistent timestamps
* Notification mutual exclusion: only one email pathway fires per event (no duplicate emails)
* Plugin activation event now logs and notifies correctly during self-activation
* Digest deduplication guards prevent duplicate daily/weekly digest emails
* Rate limiter priority map aligned with canonical priorities (low, medium, high, critical)
* Granular email "Error Events" filter now correctly matches the errors category
* Performance samples capped at 2000 entries to prevent unbounded transient growth
* Memory analysis writes reduced from every request to sampled (~1 in 10)
* Batch cron rescheduling uses time() consistently (no timezone drift)
* Retry and autoresolve crons delayed 5 minutes on activation to prevent backlog replay
* Queue overflow self-warning logged when retry queue exceeds capacity
* Cleanup anonymizer uses pure timestamp arithmetic (no double strtotime)
* All cron scheduling across plugin uses time() instead of current_time('timestamp')

= 1.1.0 =
* Advanced search and filtering with saved presets
* Custom event types with flexible metadata
* Dashboard performance optimised (60% faster)
* Timezone handling fixes

= 1.0.0 =
* Initial release
* Core logging functionality
* Admin interface
* Event registry system
* Hook integration
* Cleanup and maintenance features
