Linux 软件免费装
Banner图

Optimize More!

开发者 aryadhiratara
更新时间 2024年2月21日 01:11
PHP版本: 7.4 及以上
WordPress版本: 6.4
版权: GPLv2 or later
版权网址: 版权信息

标签

speed performance css javascript js inline optimize lazy load google font pagespeed async google fonts core web vitals delay delay javascript defer javascript delay css inline css inline javascript loading lazy varvy defer js

下载

2.0.3 1.0.9 1.0.7 1.0.5 1.0.0 1.0.1 1.0.3 1.0.4 1.0.2 1.0.6 1.0.8 1.1.0 1.1.1 2.0.0 2.0.1 2.0.2

详情介绍:

A 'Do It Yourself' WordPress Page Speed Optimization Pack. Optimizing web pages is really just about controlling how assets are delivered. Optimize your site further. Load faster on GTmetrix, Get better scores on Google Page Speed Insight. Control your CSS & JavaScripts Delivery: Load CSS Asynchronously, Delay CSS & JavaScript until User Interaction, Remove Unused CSS & JavaScript Files, Preload Critical CSS & JavaScript, Defer JavaScripts, and more. You can choose each CSS & JavaScripts individually and what type of execution is required per each post types. This plugin inspired by the mighty Flying Scripts from Gijo Varghese. Using HTML Dom Parser to manipulate your page's HTML, so we can simply use the keyword of the assets to target them. Main Features Use case: Other Features   A simple tutorial of how to use this plugin: How to use Optmize More Plugin (Indonesian Version: Cara mempercepat loading WordPress dengan plugin Optimize More). Big thanks to Gijo Varghese, without his codes in Flying Scripts, I can never be able to build this plugin. Thanks Gijo! :) Credits Disclaimer Available Filters To change the delay configuration: By default, the delay JavaScripts and CSS are configured to user interaction based. But you can change that using filter: For delay CSS, e.g.: add_filter( 'om_delay_css_time', function($om_delay_css_time) { return '3*1000'; } ); For delay JavaScripts, e.g.: add_filter( 'om_delay_css_time', function($om_delay_css_time) { return '3*1000'; } ); or if you want to change it for specific page only: For delay CSS, e.g.: add_filter( 'om_delay_css_time', function($om_delay_css_time) { if (is_front_page()) { return '3*1000'; } else { return $om_delay_css_time; } } ); For delay JavaScripts e.g.: add_filter( 'om_delay_js_time', function($om_delay_js_time) { if (is_front_page()) { return '3*1000'; } else { return $om_delay_js_time; } } ); To use Exclusions instead of Inclusions If you prefer to use 'exclusions' method, simply delay all JavaScript files using ".js" keyword, and use the provided filters to exclude specific JavaScript files: Example filter to add exclude list for the whole site (general): add_filter('delay_js_exclude_list_default', function($exclusion_list) { $exclusion_list[] = 'jquery-core'; $exclusion_list[] = 'js-cookie'; $exclusion_list[] = 'wc-add-to-cart-js'; return $exclusion_list; }); Example filter to add exclude list for Homepage option: add_filter('delay_js_exclude_list_front_page', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'custom-js'; return $exclusion_list; }); Example filter to add exclude list for Custom Page option: add_filter('delay_js_exclude_list_pages', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'another-js'; return $exclusion_list; }); Example filter to add exclude list for Archives option: add_filter('delay_js_exclude_list_archives', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'another-js'; return $exclusion_list; }); Example filter to add exclude list for Singular option: add_filter('delay_js_exclude_list_singular', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'another-js'; return $exclusion_list; }); Example filter to add exclude list for WooCommerce Products option: add_filter('delay_js_exclude_list_wc_product', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'another-js'; return $exclusion_list; }); Example filter to add exclude list for WooCommerce Archives option: add_filter('delay_js_exclude_list_wc_archives', function($exclusion_list) { $exclusion_list[] = 'jquery'; $exclusion_list[] = 'another-js'; return $exclusion_list; }); To modify the Filter Google Font Characters By default, this feature filtered the Google Font Characters to only use: 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%20!&"#$%\'()*+,-./:;<=>?@[\]^_`{|}~%26≤≥±√$€£¥•©®™ You can modify the characters using this filter: Example filter to add some extra characters: add_filter('font_characters', function ($fontCharacters) { // Modify the characters as needed $fontCharacters .= 'éèêñ'; return $fontCharacters; }); Example filter to fully use your preferred characters: add_filter('font_characters', function ($fontCharacters) { // Modify the characters as needed $fontCharacters = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%20!"#$%\'()*+,-./:;'; return $fontCharacters; }); *note the 'dot' difference Lazy Load, Preload, and more filters Example filter to add extra lazyload exclude list: add_filter( 'opm_exclude_lazy_class', function($opm_exclude_lazy_class) { return array( 'my-logo', 'my-hero-img', 'exclude-lazy' ); } ); Example filter to change the image sizes for preload featured image: add_filter( 'opm_featured_image_size', function($image_size, $post) { if ( is_singular( 'post' ) ) { return 'large'; } elseif ( is_singular( 'product' ) ) { return 'full'; } else { return $image_size; } }, 10, 2 );   Need Help? Still having trouble to speed up your site and need someone to do that for you? Try my WordPress Speed Optimization Service.   Check out my other plugins:   == Frequently Asked Questions == How to target the CSS/JavaScripts file(s)? Use keywords: this can be the CSS ID, filename, or even the folder name (/folder-name/) if you want to target all CSS from some specific plugin.

安装:

From within WordPress
  1. Visit Plugins > Add New
  2. Search for Optimize More or Arya Dhiratara
  3. Activate Optimize More from your Plugins page
  4. Find Optimize More in your sidebar menu to configure settings
Manually
  1. Download the plugin using the download link in this WordPress plugins repository
  2. Upload optimize-more folder to your /wp-content/plugins/ directory
  3. Activate Optimize More plugin from your Plugins page
  4. Find Optimize More in your sidebar menu to configure settings

屏幕截图:

  • Delay Tab — Delay CSS and JavaScript files until User Interactions
  • Preload Tab — Preload CSS, JavaScript, and Font files
  • Remove Tab — Remove (unused) CSS and JavaScript fies
  • Inline Tab — Inline CSS and JavaScript fies
  • Miscellaneous Tab

更新日志:

2.0.3 2.0.2 2.0.1 2.0.0 Complete refactor of the plugin's code. Bump to version 2.0 to mark the refactored version of this plugin and future debugging. Reasons: With these changes, for existing users, it would be best to treat it as a fresh installation. 1.1.1 1.1.0 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0