[WordPress] 外掛分享: Debug Queries

前言介紹

  • 這款 WordPress 外掛「Debug Queries」是 2007-12-18 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2015-08-20,距離現在已有 3545 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 1.5 以上版本才可以安裝。
  • 有 3 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

bueltge | inpsyde |

外掛標籤

query | analyse | queries | database | performance |

內容簡介

僅列出管理員的查詢操作,以進行偵錯。在博客前端看到所有的查詢,找出最慢的部分。

新發佈,新外掛

請使用外掛Debug Objects,提供更多資訊和更清晰的查詢視圖,與這個較舊的外掛相比。
新方案在不同的視圖中列出插件和核心查詢。

從版本 1.0.0 開始,該外掛會禁用當前連接會話的 MySQL 查詢高速緩存。這樣就可以顯示查詢的實際執行時間。要停用此行為,請將常數QUERY_CACHE_TYPE_OFF設置為FALSE。

該外掛非常適合 WordPress 開發人員,外掛和佈景主題開發人員以及正在嘗試找出博客為何變慢的站點管理員。

參數

自版本 1.0.0 起,該外掛擁有一個常數以禁用 mySQL 會話高速緩存。預設值為 true,以便更好地分析時關閉緩存!要更改此設定,請將常數QUERY_CACHE_TYPE_OFF設置為FALSE。

範例

這是一個評估範例。

# 時間:0.00198888778687
查詢:SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'
呼叫自:require, require_once, require_once, require_once, is_blog_installed, wp_load_alloptions
# 時間:0.000695943832397
查詢:UPDATE 'wp_options' SET 'option_value' = 'a:3:{i:0;b:0;s:25:\"adminimize/adminimize.php\";a:2:{i:0;O:10:\"adminimize\":1:{s:12:\"wp_filter_id\";i:0;}i:1;s:12:\"on_deinstall\";}s:31:\"debug_queries/debug_queries.php\";a:2:{i:0;O:12:\"DebugQueries\":1:{s:12:\"wp_filter_id\";i:0;}i:1;s:10:\"deactivate\";}}' WHERE 'option_name' = 'uninstall_plugins'
呼叫自:require, require_once, require_once, require_once, include_once, adminimize->adminimize, register_uninstall_hook, update_option

. . .

23 個查詢的總計查詢時間:0.0155501365662。
23 個 num_queries 的總計時間:0.392。

致謝

感謝 Joost de Valk 在 yoast.com 對插件進行小修改以提供一些額外資訊。

許可證

好消息,這個外掛是免費的!因為它是根據 GPL 發布的,您可以在個人或商業博客上免費使用它。但是如果您喜歡這個外掛,可以感謝我並留下小小的捐款宣揚這個外掛。我真的不想知道這個外掛已經花去了我多少時間😉

原文外掛簡介

List query-actions only for admins; for debug purposes. See all queries on the frontend of the blog and find the slowest part.
New release, new Plugin
Please use the plugin Debug Objects, provides more information and a cleaner query view as this older plugin.
The new solution list also the plugin and core queries in different views.
Since version 1.0.0 the plugin disable the MySQL query cache for the current connected session. That will show you the real execution time for a query. To disable this behavior set the constant QUERY_CACHE_TYPE_OFF to FALSE.
The plugin is perfect for WordPress developers, plugin and theme developers and site administrators who are trying to find out why the blog is too slow.
Params
The plugin has since version 1.0.0 a constant to disable the mySQL Session cache. On defoult is the value on true and the cache is off for an better analyse! For change this, set the constant QUERY_CACHE_TYPE_OFF to FALSE.
Example
This is a example for evaluation.
# Time: 0.00198888778687
Query: SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'
Call from: require, require_once, require_once, require_once, is_blog_installed, wp_load_alloptions
# Time: 0.000695943832397
Query: UPDATE 'wp_options' SET 'option_value' = 'a:3:{i:0;b:0;s:25:\"adminimize/adminimize.php\";a:2:{i:0;O:10:\"adminimize\":1:{s:12:\"wp_filter_id\";i:0;}i:1;s:12:\"on_deinstall\";}s:31:\"debug_queries/debug_queries.php\";a:2:{i:0;O:12:\"DebugQueries\":1:{s:12:\"wp_filter_id\";i:0;}i:1;s:10:\"deactivate\";}}' WHERE 'option_name' = 'uninstall_plugins'
Call from: require, require_once, require_once, require_once, include_once, adminimize->adminimize, register_uninstall_hook, update_option

. . .

Total query time: 0.0155501365662 for 23 queries.
Total num_query time: 0.392 for 23 num_queries.

Acknowledgements
Thanks to Joost de Valk on yoast.com for small modifed on the plugin for some extra info.
Licence
Good news, this plugin is free for everyone! Since it’s released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a small donation for the time I’ve spent writing and supporting this plugin. And I really don’t want to know how many hours of my life this plugin has already eaten 😉

各版本下載點

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

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


0.6 | 1.0.0 | 1.0.1 | 1.0.2 | trunk |

延伸相關外掛(你可能也想知道)

  • Display Posts – Easy lists, grids, navigation, and more 》Display Posts 讓您輕鬆地列出網站上的所有內容。首先在內容編輯器中新增此短碼,以列出最近的文章清單:, [display-posts], , 按類別篩選, 若只想顯示特定類...。
  • Custom Content Shortcode 》停用通知, , 此外掛已不再維護。, 請改使用下一代範本系統:Loops & Logic。, 概述, , 從單一欄位到整個頁面,Custom Content Shortcode 是一套指令,可...。
  • WP Remove Query Strings From Static Resources 》這個 WordPress 外掛名為「Remove Query Strings from Static Resources」,它會刪除靜態資源(JavaScript、CSS 檔案)中的查詢字串,進而提升 WordPress 網...。
  • Debug This 》Debug This是由友好Macho Themes團隊打造、維護和運營的獨立外掛程式。, 對於管理員、開發人員和支援人員,Debug This提供了大量的有關WordPress安裝的信息,...。
  • Loops & Logic 》Facebook group | homepage| docs |official support forum, Loops & Logic 是一個工具集,讓你可以對 WordPress 內容和數據在網站前端進行廣泛的控制,...。
  • SQL Executioner 》使用 SQL Executioner,您可以在 WordPress 管理後台中運行任意的 SQL 查詢,而無需像 phpMyAdmin 或者 MySQL 命令行客戶端那樣使用外部工具來查看和修改您的...。
  • Custom Post Limits 》此外掛可獨立控制首頁、搜尋結果、作者、分類、標籤、自訂文章型別、自訂分類法和日期存檔的文章數量,包括特定的存檔。 WordPress 預設提供一個設定選項來控...。
  • Advanced Views – Display Posts, Custom Fields, and More 》這個外掛讓你可以使用簡碼在任何地方顯示選定的 ACF 欄位或文章,HTML 格式會自動由外掛建立。, 注意:「ACF Views」外掛需要在你的網站啟用進階自訂欄位外掛...。
  • Run SQL Query 》這個外掛可以讓你透過MySQLi擴充套件提供的驅動程式在WordPress的資料庫中執行任何類型的SQL查詢,而不需要使用其他工具,如phpMyAdmin。此外,它還可以讓你...。
  • Query Wrangler 》這個外掛可以讓你建立新的 WP 查詢作為小工具,並在你的頁面上使用簡碼進行查詢。它還允許你覆寫類別和標籤頁面的顯示方式。, Query Wrangler 的界面是一種高...。
  • Query Multiple Taxonomies 》這個外掛讓你可以使用多個自訂分類來進行分面搜尋。, 它包含一個帶有多種顯示模式的下拉式小工具。, 這個小工具可以透過模板檔案輕鬆自訂(不需要 PHP 知識)...。
  • Admin Bar Tools 》這個外掛會在管理列新增一個新的選項卡,提供簡單但實用的提示和工具。, , 顯示頁面中使用的查詢數量及生成該頁面所需的時間。, 顯示 PHP 記憶體使用量和 PHP...。
  • Easy Query – WP Query Builder 》t = "Easy Query 是一個最快速和最簡單的方式,可以構建和顯示 WordPress 查詢,而無需編寫任何代碼。, 使用查詢生成器,通過調整查詢生成器中的各種參數,直...。
  • Display Posts – Date View 》此外掛可擴充Display Posts功能,讓你可以按月份或年份分類你的內容。你可以使用所有Display Posts的參數來自訂查詢。, 月份列表, [display-posts display_by...。
  • WP Query Creator 》這個外掛讓你可以建立新的 WP 查詢,並在頁面上使用簡碼進行查詢。, WP 查詢建立器是最簡單的方法,可以在不寫一行程式碼的情況下建立 wp_query。, 有時當你...。

文章
Filter
Apply Filters
Mastodon