What's Changed
Added
- AI-Powered Spam Protection: Comprehensive spam detection and user blocking system
- AI validation of chat messages using Groq API to detect spam content
- Automatic detection of spam patterns: promotional content, malicious links, adult content, cryptocurrency/NFT spam, money scams, and abuse
- User blocking after configurable spam threshold (default: 3 attempts)
- Configurable block duration (default: 24 hours)
- Admin dashboard for managing blocked users with unblock/delete options
- Spam logs with message previews and detection reasons
- Statistics dashboard showing blocked users, spam attempts, and flagged users
- Settings page for configuring spam protection behavior
- IP-based blocking to prevent circumvention via new sessions
- Activity log integration for spam events
- Notification system integration for admin alerts on user blocks
- Fallback to pattern-based detection when AI is unavailable
- 65+ unit tests for spam detection functionality
- Email Notification Enhancements
- Added "Send Test Email" button in Notifications settings tab
- REST API endpoint
/test-emailfor testing email configuration - Admins can now verify email notifications are working correctly
- Test email logs activity for tracking purposes
- Added
.cursorrulesfile for Cursor AI coding assistant instructions- Mandatory checks for CI/CD, PHPCS, and WordPress coding standards
- Changelog and version update requirements
- Code quality guidelines for PHP, JavaScript, and CSS
- Comprehensive Test Coverage: Added 410+ unit tests covering all classes and functions
- Created test bootstrap with WordPress function mocks
- API connection tests with key validation for Groq, OpenAI, and Anthropic
- File processor tests for all supported file types
- Chat widget rendering tests
- Knowledge manager tests
- Leads manager tests
- Notification manager tests
- Activity log manager tests
- REST API endpoint tests
- Integration tests for all third-party integrations
- Admin settings tests
- Live agent manager tests
- Conversations manager tests
- Plugin updater tests
- API Keys Configuration: Added secure API keys configuration file
api-keys.phpfor storing API keys securelyapi-keys.local.php.exampletemplate for local development- Both files added to
.gitignorefor security
- CI/CD Pipeline: Added GitHub Actions workflow for automated testing
- PHPCS check for WordPress Coding Standards
- PHPUnit tests across PHP 8.0, 8.1, 8.2, 8.3
- Test coverage verification (minimum 100 tests required)
- PHP 8.0+ compatibility check
- Security vulnerability scanning
- Automatic PR test coverage validation
Full Changelog: ...v1.10.0