Added guided Setup Wizard feature
This adds a guided, safe setup wizard to Autoptimize to help users configure plugin.
- Backup reminder first
- Basic site detection
- Step-by-step optimization (JS, CSS, HTML, extras)
- Incremental applies with undo potential
- Final Pro CTA matching autoptimize.com/pro/ style
- Mobile-friendly, day/night mode ready
- Add the new files/folders as described in the code steps.
- The wizard appears under Autoptimize > Setup Wizard.
- Activation shows a one-time notice.
- Addresses commonality: "(",)"
- Educates users, delivers value fast → higher retent.
- Proven results → conversions.
- Add more detection (conflicts, WooCommerce).
- "Test site" button.
- Pro presets.
Integrate into main plugin file Open autoptimize.php After the last require_once for classes (around line 40-60, after config/class), add:
require_once DIR . '/classes/autoptimizeWizard.php';
Add activation notice In autoptimize.php, add near the bottom (after other hooks):
register_activation_hook( FILE, function() { if ( ! get_option( 'autoptimize_setup_wizard_shown' ) ) { set_transient( 'ao_wizard_notice', true, WEEK_IN_SECONDS ); update_option( 'autoptimize_setup_wizard_shown', true ); } } );
add_action( 'admin_notices', function() { if ( get_transient( 'ao_wizard_notice' ) && current_user_can( 'manage_options' ) ) { ?>
Thanks for installing/updating Autoptimize! Run the new Setup Wizard for easy optimization: Start Wizard Now