[WordPress] 外掛分享: Asset CleanUp: Page Speed Booster

WordPress 外掛 Asset CleanUp: Page Speed Booster 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Asset CleanUp: Page Speed Booster」是 2015-12-02 上架。
  • 目前有 100000 個安裝啟用數。
  • 上一次更新是 2025-03-12,距離現在已有 51 天。
  • 外掛最低要求 WordPress 4.5 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 1523 人給過評分。
  • 論壇上目前有 7 個提問,問題解答率 0%

外掛協作開發者

gabelivan |

外掛標籤

dequeue | minify css | Page Speed | minify javascript | defer css javascript |

內容簡介

不要只是壓縮與合併結尾為 CSS/JavaScript 檔案,最終產生龐大、膨脹且載入速度緩慢的網頁:先削減「脂肪」,讓網站速度更快 🙂

載入速度更快 = 參觀者更開心 = 轉換率更高 = 收益更多

通常情況下,當您使用主題和多個插件並啟用並運行它們時,存在這樣的情況。但是,您不需要使用所有插件,為了提高網站的速度並使 HTML 源代碼更清潔(方便調試用途),最好防止加載那些不需要的樣式和腳本。

例如,您可能會使用一個生成聯繫表單的外掛,並且它會在您的網站的每個頁面上加載其資源(.CSS 和 .JS 文件),而不僅僅是在 /contact 頁面上(如果那是您需要的唯一場所)。

「Asset CleanUp」掃描您的頁面並檢測到所有已載入的資源。當編輯頁面/文章時,您只需選擇不需要載入的 CSS/JS,從而減少膨脹。

該外掛與緩存外掛(例如 WP Rocket、WP Fastest Cache、W3 Total Cache)、提供有服務器級緩存可用的託管公司(例如 WP Engine、Kinsta)或啟用頁面緩存的 Cloudflare 服務一起使用效果更佳。

該外掛的主要優點包括

通過卸載無用的 CSS/JS 減少已載入的 HTTP 請求數量並消除渲染阻止資源(對於更快的頁面載入很重要)
預先加載 CSS/JS、本地字體和 Google 字體文件以指示瀏覽器盡快下載所選資源
壓縮 CSS 文件(包括 STYLE 標籤內的內嵌代碼)
壓縮 JavaScript 文件(包括 SCRIPT 標籤中的內嵌代碼)
合併其餘已載入的 CSS 和 JavaScript 文件
內聯 CSS 文件(通過自動設置或指定樣式表路徑的方式)
透過將「defer」屬性應用於 SCRIPT 標記來延遲合併的 JavaScript 文件
如果未使用,將網站範圍的 Emojis、Dashicons(供訪客使用)和 Comment Reply 刪除
禁用 RSS 饋送
減少實際頁面的 HTML 代碼(如果啟用 GZIP 壓縮,那會更好)
在開發人員想要搜索某些內容的情況下,使源代碼更容易掃描
解決可能存在的插件/主題之間的衝突(例如,從不同插件加載的 2 個 JavaScript 文件,它們相互干擾)
如果您在網站上使用 GTmetrix、PageSpeed Insights、Pingdom 網站速度測試等網站測試您的 URL,表現更佳的性能得分
由於更快的頁面載入是搜索排名的因素之一,因此 Google 將更喜歡您的網站
您的服務器存取日誌文件(例如 Apache 文件)將更易於掃描,在您的服務器上佔用更少的空間

Google 字體優化/刪除

將所有 Google 字體請求合併為較少請求(通常為一個),為每個額外字體請求節省一個往返到服務器
從呈現時阻止、透過 Web Font Loader(webfont.js)進行異步處理或透過預加載 CSS 樣式表進行異步處理之間選擇三種交付方式
從 fonts.gstatic.com 預加載 Google 字體文件(例如以 .woff2 結尾的文件)的選項
將「font-display」CSS 屬性應用於所有已載入的 Google 字體請求
針對使用 Google 字體的 fonts.gstatic.com 啟用預連接資源提示;在瀏覽器開始進行 DNS/TCP/TLS 之前,不要讓瀏覽器等待取回用於加載字體文件的 CSS
刪除包括鏈結/字體預加載在內的所有 Google 字體請求

原文外掛簡介

Don’t just minify & combine CSS/JavaScript files ending up with large, bloated and slow loading pages: Strip the “fat” first and get a faster website 🙂
Faster page load = Happier Visitors = More Conversions = More Revenue
There are often times when you are using a theme and a number of plugins which are enabled and run on the same page. However, you don’t need to use all of them and to improve the speed of your website and make the HTML source code cleaner (convenient for debugging purposes), it’s better to prevent those styles and scripts from loading.
For instance, you might use a plugin that generates contact forms and it loads its assets (.CSS and .JS files) in every page of your website instead of doing it only in the /contact page (if that’s the only place where you need it).
“Asset CleanUp” scans your page and detects all the assets that are loaded. All you have to do when editing a page/post is just to select the CSS/JS that are not necessary to load, this way reducing the bloat.
The plugin works best in combination with a cache plugin (e.g. WP Rocket, WP Fastest Cache, W3 Total Cache), a hosting company that offers packages with server-level caching available (e.g. WP Engine, Kinsta) or a service like Cloudflare that has page caching enabled.
Main plugin’s benefits include

Decreases the number of HTTP requests loaded and eliminate render-blocking resources (important for faster page load) by unloading useless CSS/JS
Preload CSS/JS, Local Fonts & Google Fonts files to instruct the browser to download the chosen assets as soon as possible
Minify CSS files (including inline code within STYLE tags)
Minify JavaScript files (including inline code within SCRIPT tags)
Combine remaining loaded CSS & JavaScript files
Inline CSS Files (automatically & by specifying the path to the stylesheets)
Defer combined JavaScript files by applying “defer” attribute to the SCRIPT tags
Site-wide removal for Emojis, Dashicons for guest users and Comment Reply if they are not used
Disable RSS Feeds
Reduces the HTML code of the actual page (that’s even better if GZIP compression is enabled)
Makes source code easier to scan in case you’re a developer and want to search for something
Remove possible conflicts between plugins/theme (e.g. 2 JavaScript files that are loading from different plugins and they interfere one with another)
Better performance score if you test your URL on websites such as GTmetrix, PageSpeed Insights, Pingdom Website Speed Test
Google will love your website more as it would be faster and fast page load is nowadays a factor in search ranking
Your server access log files (e.g the Apache ones) will be easier to scan and would take less space on your server

Google Fonts Optimization / Removal

Combine all Google Font requests into fewer (usually one) requests, saving one round trip to the server for each additional font requested
Choose between three methods of delivery: Render-blocking, Asynchronous via Web Font Loader (webfont.js) or Asynchronous by preloading the CSS stylesheet
Option to preload Google Font Files from fonts.gstatic.com (e.g. ending in .woff2)
Apply “font-display” CSS property to all loaded Google Font requests
Enable preconnect resource hint for fonts.gstatic.com in case you use Google Fonts; don’t let the browser wait until it fetches the CSS for loading the font files before it begins DNS/TCP/TLS
Remove all Google Font requests including link/font preloads, @import/@font-face from CSS files & STYLE tags, resource hints

Local Fonts Optimization

Preload local font files (ending in .woff, .woff2, .ttf, etc.)
Apply “font-display:” CSS property to @font-face from existing to LINK / STYLE tags to improve the PageSpeed score for “Ensure text remains visible during webfont load”

Critical CSS

You can add already generated critical CSS (e.g. via tools such as Advanced Critical CSS Generator customly for the homepage, posts, pages, taxonomy pages (e.g. category), archive pages (e.g. date, author), search, 404 not found
The critical CSS can be added within the Dashboard as well as via code / Read More

Remove useless links, meta tags and HTML comments within the HEAD and BODY (footer) tags of the website

Really Simple Discovery (RSD) link tag
REST API link tag
Pages/Posts Shortlink tag
WordPress version meta tag (also good for security reasons)
All “generator” meta tags (also good for security reasons)
RSS Feed Link Tags (usually they are not needed if your website is not used for blogging purposes)
oEmbeds, if you do not need to embed videos (e.g. YouTube), tweets and audios
Valid HTML Comments (exceptions from stripping can be added and Internet Explorer conditional comments are preserved)

Each option can be turned on/off depending on your needs. Instructions about each of them are given in the plugin’s settings page.
Disable partially or completely XML-RPC protocol
This is an API service used by WordPress for 3rd party applications, such as mobile apps, communication between blogs and plugins such as Jetpack. If you use or are planning to use a remote system to post content to your website, you can keep this feature enabled (which it is by default). Many users do not use this function at all and if you’re one of them, you can disable it.
Plugin works with WordPress Multisite Network enabled!

Asset CleanUp Pro
This plugin is the lite version of Asset CleanUp Pro that comes with more benefits including managing assets (CSS & JS files) on all WordPress pages, unloading plugins site-wide or via Regex(es), apply “async” and “defer” attributes on loaded JavaScript files which would boost the speed score even higher, move the loading location of CSS/JS files (from HEAD to BODY to reduce render-blocking or vice-versa if you need specific files to trigger earlier) and premium support. Click here to purchase Asset CleanUp Pro!

NOTES
People that have tested the plugin are so far happy with it and I want to keep a good reputation for it. In case something is not working for you or have any suggestions, please write to me on the forum and I will be happy to assist you. BEFORE rating this plugin, please check the following post http://chrislema.com/theres-wrong-way-give-plugin-feedback-wordpress-org/ and then use your common sense when writing the feedback 🙂
GO PRO

Unload CSS/JS files on all WordPress pages including Categories, Tags, Custom Taxonomy (e.g. WooCommerce product category), 404 Not Found, Date & Author Archives, Search Results)
Unload plugins in the frontend view (for guest visitors) * This will not just unload the CSS/JS files loaded from the plugins, but everything else related to them (e.g. slow database queries)
Unload plugins within the Dashboard /wp-admin/ * Do you have any slow pages that are loading within the Dashboard? You can reduce seconds in page load for some bulky ones or fix plugin conflicts
Instruct the browser to download a CSS/JS file based on the visitor’s screen size (e.g. avoid downloading assets in mobile view when they are not needed, if the screen size is smaller than 768px)
Defer CSS by appending it to the BODY to load it asynchronously (Render blocking CSS delays a web page from being visible in a timely manner)
Move JavaScript files from HEAD to BODY and vice-versa (CSS files moved to the BODY are automatically deferred)
Defer JavaScript loaded files (by applying “defer” attribute to any enqueued JS file)
Async JavaScript loaded files (by applying “async” attribute to any enqueued JS file)
Inline JavaScript files (automatically & by specifying the path to the stylesheets)
Priority in releasing new features & other improvements (updates that are meant for both Lite and Pro plugins are first released to the Pro users)
Premium support and updates within the Dashboard

Give Asset CleanUp a try! If you want to unlock all features, you can Upgrade to the Pro version.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Asset CleanUp: Page Speed Booster」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.2 | 1.3 | 1.4 | 1.2.1 | 1.2.2 | 1.2.3 | 1.2.4 | 1.2.5 | 1.2.6 | 1.2.7 | 1.2.8 | 1.2.9 | 1.3.1 | 1.3.2 | trunk | 1.1.4.6 | 1.2.4.1 | 1.2.4.2 | 1.2.4.3 | 1.2.4.4 | 1.2.5.1 | 1.2.5.2 | 1.2.5.3 | 1.2.6.1 | 1.2.6.2 | 1.2.6.3 | 1.2.6.4 | 1.2.6.5 | 1.2.6.6 | 1.2.6.7 | 1.2.6.8 | 1.2.6.9 | 1.2.7.1 | 1.2.7.2 | 1.2.7.3 | 1.2.7.4 | 1.2.7.5 | 1.2.7.6 | 1.2.7.7 | 1.2.7.8 | 1.2.7.9 | 1.2.8.1 | 1.2.8.2 | 1.2.8.3 | 1.2.8.4 | 1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提高頁面加載速度。 這個外掛使用 PHP 庫 Minify 並且依靠 WordPress 的編輯系統而不是輸出緩存,這樣就尊重 CSS 和 JS 文...。
  • PageSpeed Ninja – Cache, Minify, Defer CSS JavaScript, Critical CSS, Optimize Images, Convert WebP 》PageSpeed Ninja是一款終極的WordPress性能外掛程式。您只需點擊一下,就可以使您的網站在桌面和手機上加載速度更快,解決Google PageSpeed Insights中的問題...。
  • Speed Booster By Melotheme 》Speed Booster By Melotheme是一款WordPress外掛程式,它可以藉由優化檔案壓縮、延後CSS和JavaScript樣式和腳本的載入、將CSS和JS文件壓縮,整合Lazy Load和...。

文章
Filter
Apply Filters
Mastodon