[WordPress] 外掛分享: Block Weight Inspector

首頁外掛目錄 › Block Weight Inspector
WordPress 外掛 Block Weight Inspector 的封面圖片
全新外掛
安裝啟用
尚無評分
82 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v0.1.0 上架:2026-01-19

內容簡介

總結:Block Weight Inspector是一個WordPress外掛,新增了一個側邊欄面板在區塊編輯器中,將當前文章/頁面中的區塊與其註冊的CSS和JS資源進行映射。它估計了本地資源的大小,突出顯示主要問題,並導出JSON報告。它還可以生成建議的條件式加載片段,以幫助您在區塊不存在時取消佇列資源。

- 這個外掛在區塊編輯器中新增了一個側邊欄面板,能夠對當前文章/頁面中的區塊與其註冊的CSS和JS資源進行映射。
- 它能夠估計本地資源的大小,突出顯示主要問題,並導出JSON報告。
- 外掛還能生成建議的條件式加載片段,以幫助您在區塊不存在時取消佇列資源。
- 外掛還添加了一個在「工具」>「Block Weight Inspector」頁面進行現有文章審核的功能,而不用打開編輯器。
- 注意:在分析內容時,檢查員會保留區塊註釋定界符,從而使parse_blocks()在消毒後仍然準確。

<html>
<ul>
<li>這個外掛在區塊編輯器中新增了一個側邊欄面板,能夠對當前文章/頁面中的區塊與其註冊的CSS和JS資源進行映射。</li>
<li>它能夠估計本地資源的大小,突出顯示主要問題,並導出JSON報告。</li>
<li>外掛還能生成建議的條件式加載片段,以幫助您在區塊不存在時取消佇列資源。</li>
<li>外掛還添加了一個在「工具」>「Block Weight Inspector」頁面進行現有文章審核的功能,而不用打開編輯器。</li>
<li>注意:在分析內容時,檢查員會保留區塊註釋定界符,從而使parse_blocks()在消毒後仍然準確。</li>
</ul>
</html>

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Block Weight Inspector」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Block Weight Inspector adds a sidebar panel in the block editor that maps blocks in the current post/page to the CSS and JS assets they register. It estimates local asset sizes, highlights top offenders, and exports a JSON report. It can also generate a suggested conditional-loading snippet to help you dequeue assets when a block is not present.
It also adds a Tools -> Block Weight Inspector screen for auditing existing posts without opening the editor.
Note: The inspector preserves block comment delimiters when analyzing content so parse_blocks() remains accurate after sanitization.
Key features:

Block -> asset mapping using registered block metadata.
Estimated size for local assets.
Top offenders summary and full asset list.
JSON export for sharing or auditing.
Suggested conditional-loading rules (review before use).

延伸相關外掛

文章
Filter
Apply Filters
Mastodon