
前言介紹
- 這款 WordPress 外掛「HookTrace – Trace Hooks with Precision」是 2026-01-07 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2026-01-14,距離現在已有 42 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 8.0 以上。
- 有 1 人給過評分。
- 論壇上目前有 1 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!
外掛協作開發者
外掛標籤
hooks | trace | debugging | profiling | hook trace |
內容簡介
總結: HookTrace是一個開發者觀察工具,記錄並視覺化 WordPress 鉤子、過濾器、以及外掛初始化在單個頁面請求中的運行順序。
問題與答案:
1. HookTrace這個外掛專為哪些環境而設計?
- 只針對開發和暫存環境。
2. HookTrace可以幫助開發者理解哪些方面?
- 被激發的鉤子、激發順序是什麼、每個鉤子上執行的回撥函數、回撥函數的優先順序和執行時間、以及插件、主題或核心位置的來源。
3. HookTrace的主要功能有哪些?
- 記錄在每個頁面請求期間觸發的所有鉤子,包括類型和源信息。
- 當選擇一個鉤子時,顯示詳細的回撥函數信息,包括優先級、執行順序、持續時間、文件路徑和來源。
- 現代化的模態界面,具有搜索和篩選功能。
- 零性能影響 - 僅在內存中存儲,不寫入數據庫。
- 提供MU-plugin引導的早期啟動支持,從一開始捕獲鉤子。
4. HookTrace的使用要求是什麼?
- WP_DEBUG必須在wp-config.php中設為true。
- 用戶必須擁有manage_options功能(管理員)。
- PHP版本必須為8.0或更高。
5. HookTrace的安全功能有哪些?
- 當WP_DEBUG為false時自動禁用。
- 不運行於非管理員用戶。
- 從不修改WordPress的行為。
- 僅觀察性 - 不會對代碼執行進行更改。
原文外掛簡介
HookTrace is a developer observability tool that records and visualizes the runtime execution order of WordPress hooks, filters, and plugin initialization for a single page request.
For Developers Only
This plugin is designed exclusively for development and staging environments. It helps developers understand:
Which hooks fired, in what order
Which callbacks executed on each hook
Callback priority and execution time
Source plugin, theme, or core location
Exact file and line number
Plugin and theme load timeline
Key Features:
Hook List Tracking – Records all hooks that fire during a page request with type and source information
Detailed Callback Inspection – When a hook is selected, displays comprehensive callback information including priority, execution order, duration, file path, and source
Modern Modal UI – Beautiful, searchable interface with filtering capabilities
Zero Performance Impact – In-memory storage only, no database writes
Early Boot Support – MU-plugin bootstrap captures hooks from the very beginning
Requirements:
WP_DEBUG must be set to true in wp-config.php
User must have manage_options capability (administrator)
PHP 8.0 or higher
Safety Features:
Automatically disables when WP_DEBUG is false
Never runs for non-admin users
Never modifies WordPress behavior
Observational only – no code execution changes
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「HookTrace – Trace Hooks with Precision」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Debug Bar Slow Actions 》這個外掛會在 WordPress 的網頁請求過程中,列出前 100 個最慢的 actions 和 filters,幫助您找出佈景主題和外掛程式的效能瓶頸。, 需要 Debug Bar。, 目前的...。WPDB Profiling 》在所有 WordPress 頁面的底部顯示資料庫效能分析。安裝方式為上傳 wpdb-profiling 到 /wp-content/plugins/ 目錄,啟用外掛,並在 wp-admin 外掛畫面中啟用 /...。
WP XHProf Profiler 》WP XHProf Profiler外掛是編寫或除錯插件和佈景主題時進行分析的方便方式。它使用Facebook Dev Team開發的PHP分析器XHProf來完成這項任務(在啟用插件之前,...。
Simple Debug 》Simple Debug Plugin for WordPress 是一個簡單的除錯插件,可分析您的 WordPress 網站的效能,並顯示最慢的執行函數。, 同時還能顯示其他有用的資訊,如錯誤...。
MySQL Profiler 》MySQL Profiler 顯示關於 SQL 查詢的調試信息給 WordPress 的管理員用戶看。對於每個查詢,該插件顯示了時間、語法高亮的 SQL 以及調用的函數跟蹤(包括調用...。
Debugger 》您可以使用此外掛手動記錄數據或捕獲 WordPress 行動的日誌。您可以捕獲負載時間、記憶體、backrace、數據轉儲、URL 和服務器 IP。, 這是為使用 wp-config.ph...。
Block Weight Inspector 》總結:Block Weight Inspector是一個WordPress外掛,新增了一個側邊欄面板在區塊編輯器中,將當前文章/頁面中的區塊與其註冊的CSS和JS資源進行映射。它估計了...。
What's running 》僅用於開發!, 現在支援OPcache內存消耗, 這個外掛會在正常的WordPress HTML輸出後,HTML標籤關閉後,輸出帶有彩色標記的文件名稱、記憶體消耗或檔案大小。這...。PMC Benchmark 》此外掛是為了查詢外掛和現行主題執行速度緩慢的鉤子。, 此外掛需要安裝和啟用 Debug Bar 外掛。它在 Debug Bar 中新增一個名為「PMC Benchmark」的面板。, 此...。
