前言介紹
- 這款 WordPress 外掛「Angry Creative Inspector」是 2013-09-11 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2015-09-08,距離現在已有 3526 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
samface | ac-robin | angrycreative |
外掛標籤
log | inspect | monitor | inspection | monitoring |
內容簡介
Angry Creative Inspector (簡稱 Angry Inspector)可以評估、監控並尋找您的 WordPress 安裝中可能存在的問題。特別推薦給需要持續監控其網站健康情況的 WordPress 安裝維護人員。如果您使用 WP-CLI,那麼您甚至可以修復 WordPress 中出現的問題。請繼續閱讀以了解更多。
此插件有兩種類型的檢查程序:一種是每隔 24 小時運行一次的定期檢查程序,另一種是由 WordPress 觸發的挂鈎或使用者操作激活的檢查。目前,以下定期運行的檢查程序已經內建支援:
- 檔案權限檢查- 您是否在所有文件上執行了 chmod 777?
- Git 修改檢查- 是否使用 Git 版本控制 WordPress?如果是,我們會記錄未提交的文件更改。
- 資料庫排序檢查- 您的資料表是否擁有適當的字元集和排序?
- 網站可見性檢查- 您的網站是否遮蔽了搜索引擎?
然後還有以下 WordPress 觸發的挂鈎或使用者操作激活的程序:
- 外掛啟用/停用- 誰停用或啟用了該外掛?
- 使用者註冊- 記錄所有使用者註冊資訊。
- 使用者資料修改- 記錄所有使用者資料的更新,包括密碼更改。
- 使用者權限修改- 誰升級或降級了該使用者的權限?
- 網站註冊- 誰在你的網站網路中創建了該網站?
- 網站啟用/停用- 誰停用或啟用了網站網路中的該網站?
- JavaScript 錯誤記錄- 監控 JavaScript 的錯誤,甚至是出現在您訪客瀏覽器中的錯誤。
需要一些配置才能充分利用文件權限和網站可見性程序,請參閱安裝說明。
進行檢查和檢查記錄檢視:
使用管理員帳戶登入 WordPress 網站,然後在 WP 管理面板下的「設定/AC Inspector」菜單下找到 Angry Inspector 頁面。您可以在此處查看檢查記錄,並通過點擊「立即檢查」按鈕手動觸發預定的檢查程序。此外,請注意「檢查程序」和「操作程序」標籤,您可以在其中更改每個程序的記錄級別。將記錄級別設置為「忽略」即可完全禁用該程序。
使用 WP-CLI 進行檢查和修復:
首先確保您已安裝 WP-CLI,有關指示請參閱 http://wp-cli.org。然後將命令行殼層轉到 WordPress 安裝目錄,並發出以下命令:
wp angry-inspector inspect
您也可以像這樣調用特定的檢查程序(使用小寫的類或函數名,不帶「ACI_Routine_」前綴,並使用破折號替換底線):
wp angry-inspector inspect file-permissions
如果 WP-CLI 檢查期間有任何提示,則該檢查器將尋找可能的修復方法並提示您是否要進行修復。如果有一個修復方法,您可以跳過檢查並直接進行修復。請按如下方式進行:
wp angry-inspector repair
要為特定檢查程序調用修復方法,請執行以下命令:
wp angry-inspector repair site-visibility
請注意,如果要使用類似於文件權限的修復方法,您需要以超級用戶身份運行命令。
原文外掛簡介
The Angry Creative Inspector, or Angry Inspector for short, will weigh, measure and find possible issues with your WordPress installation. This plugin is especially recommended to maintainers of WordPress installations that needs to continously monitor the health of their sites. Got WP-CLI? Then you may even be able to repair what’s wrong with your WordPress. Read on to learn more.
The inspector has two basic types of inspection routines; regularly repeating inspections run once every 24 hours and inspections triggered by a WordPress hook or user action. Currently, the following regularly running inspection routines are supported out of the box:
File permissions check – You didn’t do a chmod 777 on all files, right?
Git modifications check – Is your WordPress revisioned by Git? Then we log uncomitted file changes.
Database collation check – Does your tables have the proper character set and collations?
Site visibility check – Is your website blocking search engines?
Then there’s the following WordPress hook or otherwise user action triggered routines:
Plugin enabling/disabling – Who disabled or enabled that plugin?
User registrations – Logs all user registrations. No more, no less.
User profile updates – Logs all user profile updates, even password changes.
User capabilitiy changes – Who promoted or demoted that user?
Site registrations – Who created that site in your site network?
Site enabling/disabling – Who disabled or enabled that site in your site network?
Javascript error logging – Keep track of javascript errors, even the ones that appears in your visitor’s browsers.
A little configuration is needed to take full advantage of the file permissions and site visibility routines, see installation instructions.
Doing inspections and viewing inspection logs
Login to your WordPress site with an administrator account and navigate to the Angry Inspector page under the ‘Settings/AC Inspector’ menu in the WP admin panel (in network admin if multisite). In here you should see the inspection log and may trigger the scheduled inspection routines manually by clicking the “Inspect now” button. Also take note of the “Inspection routines” and “Action routines” tabs where you among other things may change the log level for each routine. Set log level to ‘ignore’ to completely disable a routine.
Inspect and repair using WP-CLI
First make sure you have WP-CLI installed, see http://wp-cli.org for instructions. Then navigate your commandline shell to your WordPress install directory and issue the following command:
wp angry-inspector inspect
You may also call a specific inspection routine like this (use all lowercase name of class or function without “ACI_Routine_”-prefix and replace underscores with dashes):
wp angry-inspector inspect file-permissions
Any inspection remarks while inspecting with WP-CLI will cause the inspector to look for a possible repair method and prompt you with the question wether you would like to make an attempt at repairing if one is found. Want to skip inspection and go directly for repairing? Here’s how:
wp angry-inspector repair
To call a repair method for a specific inspection routine:
wp angry-inspector repair site-visibility
Please note that for utilizing a repair method like the one for file permissions, you need to run the command as super-user (root) and add –allow-root to your WP-CLI commands, like this:
sudo wp angry-inspector repair file-permissions --allow-root
That’s all there is to it, really. Note that the given log_level option is just a default and may be overridden in the ‘Settings/AC Inspector’ menu in the WP admin panel (in network admin if multisite) like all the other registered inspection routines.
Creating your own inspection routines
Are you skilled in the arts of WordPress development and have a need for a check not covered by the above? Then you should extend the inspector with your own inspection routine! It’s really simple. Here’s an example you can put in your theme’s functions.php or in a plugin (after plugins loaded):
if ( function_exists( 'aci_register_routine' ) ) {
$options = array( 'description' => 'My awesome inspection routine!',
'log_level' => 'warning' ); // Possible values: notice, warning, fatal, ignore
$action = 'ac_inspection'; // Default inspection action run once every 24 hrs
aci_register_routine( 'my_inspection_routine', $options, $action );
function my_inspection_routine() {
$inspection_passed = false;
// Put your inspection code here,
// then log your results like so:
if ( !$inspection_passed ) {
AC_Inspector::log( 'Your WordPress-install did not pass your inspection routine.', __FUNCTION__ );
}
// No need to return anything...
return;
}
}
For a bit more advanced developers, you may also register a class as an inspection routine. The syntax and function used is the same, it’s just a matter of passing the class name instead of a function name. The inspector will by default look for a class function called ‘inspect’ to register as inspection method, otherwise you may add ‘inspection_method’ => ‘your_inspection_function’ to the options array to use any class function you like as your inspection method.
The reason why you would want to register a class instead of just a function is that it gives you the ability to extend the settings for your routine beyond just the log level and maybe even add a repair method to call if the inspection fails (WP-CLI only).
First off, here’s how you extend the settings for your routine (inside your inspection routine class):
public static function settings_field( $options, $args = array() ) {
$routine = $args["routine"];
/**
*
* Input field name convention: aci_options[][field_name]
* Input field id convention: aci_options__field_name
*
**/
?>
Here be extra settings field 🙂
'warning',
'description' => 'My awesome inspection routine!' );
aci_register_routine( 'my_inspection_routine_class', $default_options );
// Optional extra settings fields
add_action( 'my_inspection_routine_class_settings_field', array( 'my_inspection_routine_class', 'settings_field' ), 10, 2 );
add_filter( 'my_inspection_routine_class_settings', array( 'my_inspection_routine_class', 'settings' ), 10, 1 );
Your extra settings fields should now be visible in either the Inspection or the Action routines tab under the ‘Settings/AC Inspector’ menu in the WP admin panel (in network admin if multisite).
For a complete example routine class, checkout the routines/wp_mail.php file in the plugin directory.
As for registering a repair function, it works the same as when registering a class with an inspection method. The inspector looks for a class function called ‘repair’ by default. Override with any class function you like by defining ‘repair_method’ => ‘your_repair_function’ in the options array. However, a repair method will never be called automatically. You need WP-CLI ( http://wp-cli.org/ ) installed and issue the appropriate commands, see “Inspect and repair using WP-CLI” above.
Happy… no wait, angry inspecting! 🙂
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Angry Creative Inspector」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.2 | 0.3 | 0.4 | 0.6 | 0.7 | 0.8 | 0.1.1 | 0.1.2 | 0.2.1 | 0.2.2 | 0.3.1 | 0.3.2 | 0.3.3 | 0.4.1 | 0.4.2 | 0.5.0 | 0.5.1 | 0.5.2 | 0.5.3 | 0.5.4 | 0.6.1 | 0.8.1 | 0.8.2 | 0.8.3 | 0.8.4 | trunk |
延伸相關外掛(你可能也想知道)
WP Updates Notifier 》這個外掛程式會監控你的 WordPress 安裝,並會在核心、外掛程式和佈景主題更新時發送電子郵件通知你。如果你不經常登入 WordPress 管理員,或支援客戶的網站...。
APCu Manager 》在 WordPress 管理員儀表板中準確地管理 APCu 統計信息。, APCu 管理器是一個功能完整的 APCu 管理和分析報告工具。它使您能夠監視和優化 WordPress 網站或網...。
SiteAlert – Uptime, Speed, and Security Monitoring for WordPress 》SiteAlert 檢查您的 WordPress 安裝,以確保其健康、最新和安全。使用 SiteAlert 頁面,可以使用簡單的彩色區域快速查看檢查的結果。, 安裝後,將會在工具菜...。
Health Endpoint 》這個簡單的外掛程式會建立一個 /health 的端點,讓你監控 WordPress 網站的狀態。端點會測試資料庫連接的狀態,當你的網頁健康時返回 200 OK 的 HTTP 狀態碼...。
OPcache Manager 》在 WordPress 管理員控制面板中查看 OPcache 統計數據和管理功能。, OPcache Manager 是一款完整的 OPcache 管理和分析報告工具,它允許您監控和優化 WordPre...。
Cron Setup and Monitor – Get URL Cron 》使用 Get URL Cron 外掛可以檢視、建立和檢查 cron 作業,進行 Http-URL 或 Shortcode 請求。, Get URL Cron 外掛功能包括:, * 新增、編輯、刪除 cron 作業...。
WordPress File Monitor 》監視您的網站,以查看新加、更改和已刪除的檔案!跟蹤所有網站目錄中的變更,並在電子郵件中收到警報!免費保持安全!, 功能, , 監視檔案系統以查看新增/刪除...。
Banhammer – Monitor Site Traffic, Block Bad Users and Bots 》, Banhammer:保護你的網站免於敵人襲擊!, , Banhammer 給予你完全控制權,決定誰有權限進入你的網站。在防禦塔中監視網路流量,並審查可疑的訪問者。如果你...。
OPcache Dashboard 》如您所知,OPcache 沒有管理頁面。 這個外掛為 WordPress 設計了 OPcache 儀表板。, , 使用 WordPress 和 OPcache 時,您是否遇到問題? 在升級核心/插件/佈...。
Sites Monitor 》網站健康評估一直都是一個重要的議題,因此, Sites Monitor 外掛為WordPress使用者提供了一個便利的解決方案。這個外掛可以讓使用者從一個簡單的 WordPress ...。
OPCache Scripts 》使用此外掛程式顯示有關您的伺服器的 OPCache 詳細資訊,包括記憶體使用情況、所有快取腳本的清單以及基於檔案系統樹的有用的記憶體使用情況視覺化。, 此外掛...。
NEW! WordPress Status Monitor 》WordPress Status Monitor 是一個易於安裝的管理外掛,用於檢查您的網站的狀態、資源和正常運作的時間。, 特點, , 狀態監控:測試您的網站是否運作正常以及其...。
Graphic Web Design, Inc. Manager 》這個外掛可以自動更新你的 WordPress 主版本、次版本、外掛和佈景主題,以提高網站的安全性。此外,它還會發送電子郵件通知你外掛已更新,讓你可以驗證網站是...。
SacksonWeb Data 》免費版本 - 本外掛會在您安裝的網站上收集數據,您可以進入設定頁面檢視一些我們建議您審查並考慮更改的設定。, , 此外,PRO 版本會利用第三方服務 https://m...。
Loginpetze 》有時候,知道使用者在 WordPress 成功登入的時間是相當有用的。Loginpetze 可以生成一封通知郵件來通知這件事情。這是一種方便的方法,例如監控客戶登入暫存...。