=== HeyRobot – BOT Logger ===
Contributors: kim-frederiksen
Donate link: https://heyrobot.com
Tags: bots, crawler, search engine, logs, google, bing
Requires at least: 6.2
Tested up to: 6.7
Stable tag: 0.9.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Logs visits from popular search engines (Google, Bing, etc.) and displays them in the Admin with cleanup, filtering, and a “Clear Log” feature.
== Description ==
HeyRobot – BOT Logger is a simple plugin that detects visits from known search engine user agents such as Googlebot, Bingbot, Yahoo! Slurp, DuckDuckBot, etc., and stores the visit details (bot name, user agent, page visited, and timestamp) in a custom database table. From the WordPress admin, you can:
- View a list of all logged bot visits with pagination.
- Filter the logs by a specific bot (e.g., “Googlebot” only).
- Set an automatic cleanup schedule to remove old records (e.g., older than X days).
- Quickly clear the entire log when needed.
This plugin can help you understand how often (and which) bots crawl your site. It works out of the box with minimal configuration.
== Installation ==
- Upload the
heyrobot-bot-logger
folder to your/wp-content/plugins/
directory or install it via the WordPress Plugin Manager (if available). - Activate the plugin through the Plugins menu in WordPress.
- A new menu item, “HeyRobot Logs”, will appear in your WordPress admin menu.
- Optionally, configure items per page, automated cleanup, and cleanup retention days in “HeyRobot Logs” → “Settings”.
That’s it! The plugin will begin detecting and logging bot visits immediately.
== Frequently Asked Questions ==
= Which bots are detected by default? =
By default, we match popular user agents such as:
- Googlebot
- Bingbot
- Yahoo! Slurp
- DuckDuckBot
- Baiduspider
- YandexBot
- Facebook’s facebot
- …and more!
You can expand the $known_bots
array in the plugin code to detect additional crawlers if needed.
= Will this plugin slow down my site? =
No. The detection and insert processes are lightweight, and the plugin only stores minimal data (bot name, user agent, visited page, timestamp). Database interactions are limited, and you can enable automatic cleanup to keep the table size under control.
= How do I clear the current log? =
On the “HeyRobot Logs” page, there is a “Clear Log” button at the top. Clicking this button removes all records from the log.
If you want to also reset the autoincrement value, you can replace DELETE FROM
with TRUNCATE TABLE
in the plugin’s code.
= Can I filter visits by a specific bot? =
Yes. At the top of the logs page, there’s a dropdown labeled “Filter by Bot”. Selecting a particular bot (e.g., “Googlebot”) will display only its visit entries. Selecting “All Bots” shows every record.
== Screenshots ==
(Optional: Include screenshots if you wish. For WordPress.org, name them screenshot-1.png, screenshot-2.png, etc.)
== Changelog ==
= 0.9.5 =
- Security improvement: escaped all dynamic output to comply with WordPress plugin standards and pass plugin checks.
- Minor code adjustments for better sanitization and escaping in admin-facing pages.
= 0.9 =
- Initial public release with bot logging, pagination, automatic cleanup, filtering by bot name, and a “Clear Log” feature.
== Upgrade Notice ==
= 0.9.5 =
Security update to ensure all user-facing output is properly escaped and sanitized. No special actions required; simply upgrade.
= 0.9 =
First release. No special actions required. If you already had an alpha version, deactivate and reactivate to ensure the database table structure is updated.