Skip to content

Get rid of Minify HTML option #2682

Closed
@GeekPress

Description

@GeekPress

What are we proposing to do?

With this update we are hoping to remove the « Minify HTML » option from WP Rocket UI (File Optimization tab).

Why are we doing this?

GT Metrix has deprecated this recommandation as the effect on overall performance is very small :

https://gtmetrix.com/blog/recommendation-updates-http-2-changes-and-more/?fbclid=IwAR1ZQ2FUmlbazFScrVIAUG08MV5-yVXVXU4J36vubnvZ6MeclF43QwAla44

GT Metrix was the latest performance tool to recommend HTML minification. PageSpeed Insight and Pingdom Tools ignore this recommandation since a while.

Here a GT Metrix test comparaison:

With Minify HTML

https://gtmetrix.com/reports/wp-rocket.me/JUC11exR

  • Grade: 100 / 96

  • Loading time: 0.8s

  • Page Size: 956KB

Without Minify HTML

https://gtmetrix.com/reports/wp-rocket.me/Xv7fZ4DG

  • Grade: 100 / 96

  • Loading time: 0.8s

  • Page Size: 957KB

The loading time is exactly the same. Why? The page size only increased by 0.01KB...

How will we do this feature?

From version 3.7, all users will not have this option in WP Rocket UI and HTML minification won't be applied anymore.

Both existing and new users will have the same experience.

Development

inc/Plugin.php

  • Remove the minify_html_subscriber entry from the subscribers

inc/admin/upgrader.php

  • Remove the entry for minify_html in rocket_first_install()

  • Remove the checks for minify_html in rocket_new_upgrade()

inc/admin/ui/meta-boxes.php

  • Remove minify_html from the $fields in rocket_display_cache_options_meta_boxes() and rocket_save_metabox_options()

inc/admin/ui/notices.php

  • Remove the checks for minify_html in rocket_plugins_to_deactivate()

inc/3rd-party/hosting/wp-serveur.php

  • Deprecate the rocket_deactivate_inline_js_on_wp_serveur() function

inc/3rd-party/plugins/appbanner.php

  • Deprecate the rocket_deactivate_js_minifier_with_appbanner() function

  • Delete the file

  • Remove the require in inc/3rd-party.php

inc/3rd-party/plugins/autoptimize.php

  • Deprecate the rocket_maybe_deactivate_minify_html() function

  • Update rocket_activate_autoptimize() to remove the check for minify_html

  • Deprecate rocket_maybe_disable_minify_html()

inc/3rd-party/plugins/slider/revslider.php

  • Deprecate the rocket_deactivate_js_minifier_with_revslider() function

  • Delete the file

  • Remove the require in inc/3rd-party.php

inc/classes/subscriber/Optimization/class-minify-html-subscriber.php

  • Deprecate the class

inc/Engine/Beacon/Beacon.php

  • Remove minify_html from session_data()

inc/Engine/Admin/Deactivation/DeactivationIntent.php

  • Remove minify_html from activate_safe_mode()

inc/Engine/Admin/Settings/Page.php

  • Remove references to minify HTML option

inc/Engine/Admin/Settings/Settings.php

  • Remove references to minify_html in sanitize_callback()

inc/Engine/Optimization/ServiceProvider.php

  • Remove registering minify HTML subscriber in $provides and register()

inc/vendors/classes/class-minify-html.php

  • Deprecate the class

Risks

Since we are removing a feature, this should be low risk. The major concern is educating customers.

Testing

  • Update WP Rocket to 3.7.

  • The UI for "Minify HTML" is removed.

  • On front-end, the HTML shouldn't be minified

Documentation and Translations

Metadata

Metadata

Assignees

No one assigned

    Labels

    epics 🔥For large tasks or features, broken into smaller issues.module: file optimizationneeds: documentationIssues which need to create or update a documentationtype: enhancementImprovements that slightly enhance existing functionality and are fast to implement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions