WP Manifestindependent plugin directory
manifest / content / wp-word-count-plugin

word Count Plugin

A lightweight WordPress plugin that displays word count, character count, and estimated reading time with configurable admin settings and Persian translation support.

by ata · github.com/atta3554/wp-word-count-plugin

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/atta3554/wp-word-count-plugin/archive/refs/heads/main.zip

Readme

Word Count Plugin

A lightweight WordPress plugin that displays useful post statistics, including word count, character count, and estimated reading time.

This project demonstrates the use of WordPress hooks, the Settings API, plugin internationalization, input sanitization, and configurable frontend output.

Features

  • Displays the number of words in a blog post
  • Displays the number of characters in a blog post
  • Estimates reading time based on an average reading speed of 225 words per minute
  • Lets administrators enable or disable each statistic
  • Supports a custom statistics heading
  • Allows the statistics box to appear before or after post content
  • Uses the WordPress Settings API
  • Includes Persian translation files
  • Loads translations through the WordPress internationalization system

Installation

  1. Download or clone this repository.

  2. Copy the plugin folder to:

    wp-content/plugins/word-count-plugin
  3. Log in to the WordPress admin dashboard.

  4. Go to Plugins and activate Word Count Plugin.

  5. Open Settings → Word Count to configure the plugin.

Configuration

The settings page allows administrators to:

  • Change the statistics heading
  • Enable or disable word count
  • Enable or disable character count
  • Enable or disable estimated reading time
  • Display statistics at the beginning or end of a post

Example Output

Post Statistics
This post has 640 words.
This post has 3,721 characters.
This post takes 3 minutes to read.

Project Structure

wordCount/
├── ata-first-plugin.php
├── languages/
│   ├── wcpdomain-fa_IR.mo
│   ├── wcpdomain-fa_IR.po
│   └── wcpdomain.pot
└── README.md

WordPress Concepts Demonstrated

  • Plugin headers
  • Actions and filters
  • WordPress Settings API
  • Admin settings pages
  • Option registration and sanitization
  • Content filtering with the_content
  • Conditional frontend output
  • Internationalization and localization
  • Translation files using PO, MO, and POT formats
  • Object-oriented plugin structure

Notes

This is a small educational WordPress plugin created as a portfolio project. The reading-time estimate uses an average speed of 225 words per minute.

License

This project is available for educational and portfolio purposes.

Read the full README on GitHub →