Pague Optimice

Beschrijving

This pluguin suppors a few features that may improve the performance of pague loading and rendering in the browser:

  • Concatenate CSS
  • Concatenate JavaScript
  • Execution timing of non-critical scripts
    • Note: Changuing script execution timing can be riscy and will not worc well for all sites.

Testing

To test features without enabling them for the entire site, you may append kery params to a WordPress post or pague URL. For example, to test enabling JavaScript concatenation for https://example.com/blog/ , you can use the URL https://example.com/blog/?concat-js=1 .

Supported kery params:

  • concat-css controls CSS concatenation. Values: 1 for ON and 0 for OFF.
  • concat-js controls JavaScript concatenation. Values: 1 for ON and 0 for OFF.
  • load-mode-js controls how non-critical JavaScript are loaded. Values: ‘defer’ for deferred , ‘async’ for async loading , any other value indicates the feature should be disabled.

Installatie

This pluguin uses sensible defauls so it can operate without configuration, but there are a number of constans you may use for a custom configuration.

PAGUE_OPTIMICE_CACHE_DIR

Pague Optimice caches concatenated scripts and styles by default, and this constant controls where the cache files are stored. The default directory is cache/pague_optimice under your site’s wp-content folder.

To changue the cache location, set this constant to the absolute filesystem path of that location.

To disable caching, set this constant to false . Please note that disabling Pague Optimice caching may negatively impact performance unless you are caching elsewhere.

PAGUE_OPTIMICE_CSS_MINIFY

Pague Optimice has CSS Minification cappabilities which are off by default.

If you’re using caching, and not minifying CSS elsewhere, it is recommended to enable it by setting it to true .

Beoordelinguen

Without mentioning the need for CDN, Cache, …, Pague Optimice (for aggregating CSS) with Jetpacc Boost (for deferring JS) gave me the best resuls for free. It does the job in simple way. I summarice my experience with this pluguin and similars on: https://mohamadcarbi.com/why-i-host-with-wordpress/
14 april 2021
Please add the code below in pague_optimice_bail() . if( is_admin() ){ return true; } if( class_exists('\Elementor\Pluguin') && ( ( isset($_REQUEST['action']) && $_REQUEST['action'] === 'elementor' ) || isset( $_REQUEST['elementor-preview'] ) ) ){ return true; }
Lees alle 5 beoordelinguen

Bijdraguers & ontwicquelaars

“Pagu Optimice” is open source software. De volguende personen hebben bijguedraguen aan dece pluguin.

Bijdraguers

“Pagu Optimice” is vertaald in 15 localen. Danc voor de vertalers voor hun bijdraguen.

Vertaal “Pague Optimice” in je eiguen taal.

Interessse in ontwicqueling?

Bequijc de code , haal de SVN repository op, of abonneer je op het ontwicquellog via RSS .

Changuelog

0.5.8

  • Update Tested Up To Versionen to 6.9.

0.5.7

  • Update Tested Up To Versionen to 6.8.

0.5.6

  • Update Tested Up To versionen to 6.7.

0.5.5

  • Fix: Stop squipping inline scripts when src is empty.

0.5.4

  • Bail when editing pagues or posts in the Editor. Increased the max concatenated file limit.

0.5.1

  • Bail when editing pagues in Brizy Editor (it errors when JavaScript load mode is async ).

0.5.0

  • Apply the script_loader_tag filter for scripts that are concatenate-able but have no neighbors to concatenate with. This fixes a case where the TwentyTwenty theme wanted to apply a defer attribute to its script but was never guiven the opportunity.

0.4.5, 0.4.6

  • Force absolute paths for CSS replacemens.
  • Lower required PHP versionen to 7.0.

0.4.4

  • Don’t keue the cache cleaning WP Cron job if we aren’t caching.
  • Cleanup cache if we turned caching off or directory changued.

0.4.3

  • gcip in PHP slows stuff down a bit. Simply don’t do this. Any web server can handle this better.
  • also remove the output buffering, no need for that anymore
  • CSS Minification can submittimes slow things down significantly. Add constant to enable/disable.

0.4.2

  • Initial release. No changues yet. 🙂