• v1.2.1 5b50b0a26d

    UltimateByte released this 2025-11-09 23:03:08 +01:00 | 9 commits to main since this release

    💡 This release refines the plugin’s architecture for lighter performance and cleaner maintainability, ensuring a solid base for future modular updates.

    Performance Optimizations

    • Admin class now loads only in admin context (not on frontend).
    • Settings class no longer loaded on frontend.
    • Import/Export class lazy-loads only during actual import/export operations.
    • Frontend assets (JS/CSS) load only when the block is present on the page.
    • Admin assets load only on plugin admin pages.
    • Reduced memory footprint for non-admin requests.

    🧩 Code Quality Improvements

    • Refactored AJAX handler registration (11 calls → 1 loop).
    • Streamlined submenu registration (4 calls → 1 loop).
    • Added verify_ajax() helper for centralized AJAX security checks.
    • Added sanitize_object() helper to eliminate duplicate sanitization code.
    • Removed redundant class require statements from admin methods.
    • Adopted nullsafe coalescing operator (??=) for singleton patterns.
    • ~70+ lines reduced through DRY (Don’t Repeat Yourself) principles.

    🛠️ Technical Changes

    • Split admin vs frontend initialization hooks for cleaner architecture.
    • Database class now always loads (required for activation hook and block logic).
    • No breaking changes — full backward compatibility maintained.
    Downloads