Title: TK bbPress Stats
Author: TKServer
Published: <strong>2016 年 3 月 20 日</strong>
Last modified: 2026 年 1 月 30 日

---

搜尋外掛

![](https://ps.w.org/tk-bbpress-stats/assets/banner-772x250.jpg?rev=1379466)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/tk-bbpress-stats/assets/icon-128x128.jpg?rev=1379467)

# TK bbPress Stats

 由 [TKServer](https://profiles.wordpress.org/tkserver/) 開發

[下載](https://downloads.wordpress.org/plugin/tk-bbpress-stats.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/tk-bbpress-stats/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/tk-bbpress-stats/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/tk-bbpress-stats/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/tk-bbpress-stats/#developers)

 [技術支援](https://wordpress.org/support/plugin/tk-bbpress-stats/)

## 外掛說明

TK bbPress Stats provides useful statistics about your bbPress forum with modern
security and performance features. Fully compatible with PHP 8.5 while maintaining
backward compatibility to PHP 7.4.

**Key Features:**

 * Display forum statistics in widgets or via shortcode
 * Intelligent caching for optimal performance
 * Secure database queries with prepared statements
 * Full internationalization support
 * Modern PHP 8.5 code with type safety
 * Conditional asset loading for better performance

**Available Statistics:**

 1. Total Users
 2. Total Topics
 3. Total Replies
 4. Total Posts (topics + replies)
 5. Total Forums

Each statistic can be individually enabled/disabled, and the widget title is fully
customizable.

**Security Features:**

 * SQL injection protection with prepared statements
 * XSS prevention with proper output escaping
 * Input sanitization on all user data
 * Capability checks for admin access
 * Path traversal protection

**Performance Optimizations:**

 * Smart caching (1-hour default, auto-invalidates on changes)
 * Conditional script/style loading
 * Optimized database queries
 * Minimal resource footprint

## 螢幕擷圖

[⌊Widget settings - back end⌉⌊Widget settings - back end⌉[

Widget settings – back end

[⌊Widget display - front end⌉⌊Widget display - front end⌉[

Widget display – front end

## 安裝方式

#### Automatic Installation

 1. Log in to your WordPress admin panel
 2. Navigate to Plugins > Add New
 3. Search for “TK bbPress Stats”
 4. Click “Install Now” and then “Activate”

#### Manual Installation

 1. Download the plugin zip file
 2. Upload the folder `tk-bbpress-stats` to the `/wp-content/plugins/` directory
 3. Activate the plugin through the ‘Plugins’ menu in WordPress
 4. Configure the widget in Appearance > Widgets or use the shortcode

#### Widget Usage

 1. Go to Appearance > Widgets
 2. Drag “TK bbPress Stats” to your desired widget area
 3. Configure which statistics to display
 4. Save your settings

#### Shortcode Usage

Insert this shortcode in any post or page: [widget widget_name=”TK_bbPress_Stats”]

Then configure display options in Settings > TK bbPress Stats

#### Requirements

 * WordPress 5.0 or higher
 * bbPress plugin installed and activated
 * PHP 7.4 or higher (PHP 8.0+ recommended)

## 常見問題集

### What statistics can this widget display?

The widget can show:
 * Total Users * Total Topics * Total Replies * Total Posts(
topics + replies combined) * Total Forums

Each statistic can be individually enabled or disabled.

### Does the widget count unpublished or trashed content?

No, only published topics, replies, and forums are counted.

### Is this plugin compatible with PHP 8.5?

Yes! Version 2.0.0 is fully compatible with PHP 8.5 while maintaining backward compatibility
with PHP 7.4+.

### How does caching work?

Statistics are cached for 1 hour by default. The cache automatically clears when:
*
A new topic is created * A new reply is posted * A new forum is created * A user
registers or is deleted

### Is this plugin secure?

Yes, version 2.0.0 includes comprehensive security improvements:
 * SQL injection
protection with prepared statements * XSS prevention with proper escaping * Input
sanitization * Capability checks * Path traversal protection

### Will upgrading from v1.x break my site?

No, version 2.0.0 is fully backward compatible. Your existing settings and widget
configurations will be preserved.

### Can I customize the cache duration?

Yes, add this to your wp-config.php:
 define(‘TK_BBPRESS_STATS_CACHE_EXPIRATION’,
3600); // seconds

### Does this work with multisite?

Yes, the plugin works with WordPress multisite installations.

### How do I translate this plugin?

The plugin is fully internationalized. Use a translation plugin like Loco Translate
or create .po/.mo files in the /lang directory.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈TK bbPress Stats〉的開發相關工作。

參與者

 *   [ TKServer ](https://profiles.wordpress.org/tkserver/)

〈TK bbPress Stats〉外掛目前已有 2 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/tk-bbpress-stats/contributors)
為這個外掛做出的貢獻。

[將〈TK bbPress Stats〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/tk-bbpress-stats)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/tk-bbpress-stats/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/tk-bbpress-stats/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/tk-bbpress-stats/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/tk-bbpress-stats/)。

## 變更記錄

#### 2.0.0 – 2026-01-26

**Major Security & Modernization Release**

 * **SECURITY**: Fixed SQL injection vulnerability in database queries
 * **SECURITY**: Added input sanitization for all user inputs
 * **SECURITY**: Implemented capability checks for admin access
 * **SECURITY**: Added path validation for file includes
 * **SECURITY**: Proper output escaping throughout
 * **NEW**: PHP 8.5 compatibility with type declarations
 * **NEW**: Intelligent caching system (1-hour default)
 * **NEW**: Conditional asset loading for better performance
 * **NEW**: Full internationalization support
 * **NEW**: bbPress dependency check on activation
 * **IMPROVED**: Modern PHP syntax (short arrays, typed properties)
 * **IMPROVED**: Optimized database queries with prepared statements
 * **IMPROVED**: Better error handling and user feedback
 * **IMPROVED**: Code organization and documentation
 * **IMPROVED**: Widget configuration interface
 * **FIXED**: Deprecated widget constructor
 * **FIXED**: Undefined array key warnings
 * **FIXED**: Inconsistent option naming
 * Minimum PHP version: 7.4 (backward compatible)
 * Minimum WordPress version: 5.0
 * Tested up to WordPress 6.7

#### 1.0.3 – 2016-03-27

 * Added shortcode option for putting widget inside posts/pages

#### 1.0.2 – 2016-03-26

 * Small code cleanup
 * Added screenshots, icon and header image

#### 1.0.1 – 2016-03-25

 * Small code cleanup
 * Image updates

#### 1.0.0 – 2016-03-20

 * Initial release

## 中繼資料

 *  版本 **2.0.0**
 *  最後更新 **5 個月前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.7.5**
 *  PHP 版本需求 ** 8.0 或更新版本 **
 *  語言
 * [English (Canada)](https://en-ca.wordpress.org/plugins/tk-bbpress-stats/)、[English (US)](https://wordpress.org/plugins/tk-bbpress-stats/)、
   及 [Swedish](https://sv.wordpress.org/plugins/tk-bbpress-stats/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/tk-bbpress-stats)
 * 標籤:
 * [bbPress](https://tw.wordpress.org/plugins/tags/bbpress/)[forum](https://tw.wordpress.org/plugins/tags/forum/)
   [statistics](https://tw.wordpress.org/plugins/tags/statistics/)[stats](https://tw.wordpress.org/plugins/tags/stats/)
   [widget](https://tw.wordpress.org/plugins/tags/widget/)
 *  [進階檢視](https://tw.wordpress.org/plugins/tk-bbpress-stats/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/tk-bbpress-stats/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/tk-bbpress-stats/reviews/)

## 參與者

 *   [ TKServer ](https://profiles.wordpress.org/tkserver/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/tk-bbpress-stats/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://www.tkserver.com/)