Skip to content

v3.16.0: One-Click Automated Update System

Choose a tag to compare

@peterjaffray peterjaffray released this 06 Oct 23:18
· 178 commits to master since this release
f331b37

Release Notes - v3.16.0

Choice Universal Form Tracker - One-Click Automated Update Feature

Release Date: October 6, 2025
Version: 3.16.0
Branch: 005-one-click-automated

πŸŽ‰ Major Feature Release: One-Click Automated Updates

This release introduces a comprehensive one-click automated update system that seamlessly integrates with WordPress's native update mechanism, providing automatic updates directly from GitHub releases.

✨ New Features

One-Click Update System

  • Seamless WordPress Integration: Updates now appear in the standard WordPress Updates page
  • GitHub Release Integration: Automatically fetches the latest releases from GitHub
  • One-Click Installation: Update with a single click from the WordPress admin
  • Real-Time Progress Tracking: Visual progress indicators during update process
  • Automatic Rollback: Failed updates automatically restore the previous version
  • Version Management: Clear display of current and available versions

Update Automation

  • Scheduled Checks: Automatic update checks run twice daily via WordPress Cron
  • Manual Check Option: Force update checks from the admin bar
  • Smart Caching: 12-hour transient caching to minimize GitHub API calls
  • Rate Limit Protection: Intelligent handling of GitHub API rate limits

Enhanced Security

  • Nonce Validation: Proper CSRF protection for all AJAX endpoints
  • Capability Checks: Enforces update_plugins capability for all update operations
  • HTTPS Enforcement: All downloads require secure connections
  • Download Verification: Checksums and file integrity validation
  • Automatic Backup: Creates backup before every update attempt

User Experience Improvements

  • Update Dashboard Widget: Quick status overview in WordPress dashboard
  • Progress Indicators: Real-time update progress with stage information
  • Update History: View past update attempts and their outcomes
  • Settings Panel: Configure automatic updates and check frequency
  • Admin Bar Integration: Quick access to update checks from admin bar
  • Error Recovery: Graceful handling of network failures and corrupted downloads

πŸ”§ Technical Implementation

Backend Components

  • GitHub API Client (class-cuft-github-api.php): Handles GitHub release fetching
  • Update Checker (class-cuft-update-checker.php): Manages update detection with caching
  • Filesystem Handler (class-cuft-filesystem-handler.php): Safe file operations using WP_Filesystem
  • Backup Manager (class-cuft-backup-manager.php): Automatic backup and rollback functionality
  • Update Installer (class-cuft-update-installer.php): Handles the actual update process
  • WordPress Integration (class-cuft-wordpress-updater.php): Hooks into WordPress update system
  • Cron Manager (class-cuft-cron-manager.php): Schedules automatic update checks

Frontend Components

  • Update Manager JS (cuft-updater.js): Main JavaScript controller with retry logic
  • Progress Indicator (cuft-progress-indicator.js): Visual update progress tracking
  • Update Widget (cuft-update-widget.js): Dashboard widget functionality
  • History Viewer (cuft-update-history.js): Browse update history
  • Settings Form (cuft-update-settings.js): Configure update preferences
  • Error Handler (cuft-error-handler.js): User-friendly error messaging

Security Features

  • Rate Limiting (class-cuft-rate-limiter.php): Prevents abuse of update endpoints
  • Download Verification (class-cuft-download-verifier.php): Validates downloaded files
  • Capability Manager (class-cuft-capabilities.php): Enforces proper permissions
  • Input Validator (class-cuft-input-validator.php): Sanitizes all user inputs

Performance Optimizations

  • Database Optimizer (class-cuft-db-optimizer.php): Optimized queries with indexing
  • Cache Warmer (class-cuft-cache-warmer.php): Preloads transients for admin pages
  • Lazy Loader (cuft-lazy-loader.js): Efficient loading of update history

πŸ› Bug Fixes

Critical Fix: AJAX Nonce Validation

  • Issue: AJAX endpoints were returning "Security check failed" due to incorrect nonce handling
  • Resolution: Properly implemented nonce generation, localization, and validation
  • Impact: All AJAX-based update operations now work correctly

πŸ“Š Performance Metrics

  • Update Check Speed: < 2 seconds (with caching)
  • Download Time: Varies by file size and connection
  • Installation Time: < 30 seconds for typical plugin size
  • Rollback Time: < 10 seconds
  • Memory Usage: Minimal impact on WordPress memory

πŸ”„ Migration Notes

For Administrators

  1. After updating, visit Settings β†’ Universal Form Tracker β†’ Updates
  2. Configure your preferred update settings
  3. Enable/disable automatic updates as needed
  4. Review the update history to verify past updates

For Developers

  • The update system respects WordPress file permissions
  • Custom hooks available for extending update functionality
  • Logs stored in wp_cuft_update_log table for debugging
  • Mock mode available for testing update scenarios

πŸ“‹ Testing Coverage

Completed Test Suites

  • βœ… AJAX endpoint contract tests
  • βœ… Integration tests for all update scenarios
  • βœ… Security validation tests
  • βœ… Performance benchmarks
  • βœ… Rollback mechanism tests
  • βœ… Settings preservation tests
  • βœ… Corrupted download handling tests

πŸ” Security Considerations

  • All update operations require administrator privileges
  • Nonce validation on every AJAX request
  • Rate limiting prevents abuse
  • Automatic rollback on any failure
  • No sensitive data logged

πŸ“ Known Limitations

  1. GitHub API Rate Limits: Unauthenticated requests limited to 60/hour
  2. Large Updates: Files > 50MB may timeout on slow connections
  3. File Permissions: Some hosts may require manual permission adjustments
  4. WordPress Version: Requires WordPress 5.0+ for full functionality

πŸš€ Next Steps

  1. Monitor update logs for any issues
  2. Test update process in staging environment first
  3. Configure automatic updates based on your needs
  4. Report any issues to the development team

πŸ“– Documentation

  • Quick Start Guide: specs/005-one-click-automated/quickstart.md
  • User Guide: docs/user-guide.md
  • Troubleshooting: docs/troubleshooting.md
  • Developer Guide: docs/developer-guide.md

πŸ™ Acknowledgments

This feature was developed following WordPress best practices and the plugin's constitutional principles, ensuring maximum compatibility and reliability.

πŸ“ž Support

For issues or questions about the update feature:

  • Check the troubleshooting guide
  • Review update logs in the admin panel
  • Contact support with relevant error messages

Note: This is a major feature release. We recommend testing in a staging environment before deploying to production.