WP Manifestindependent plugin directory
manifest / editor / mtdev-post-time-to-read

MTDev – Post Time to Read Block

★ 0stars
4release downloads
v1.0.0latest · 1 year ago

Install

Download mtdev-post-time-to-read.zip From the v1.0.0 release on GitHub, May 5, 2025

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/martatorredev/mtdev-post-time-to-read/releases/download/v1.0.0/mtdev-post-time-to-read.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A custom Gutenberg block that displays the estimated reading time of a post.
Developed by Marta Torre


🧩 About this plugin

This plugin adds a WordPress block that calculates and shows the estimated reading time of a post, based on its content.

It is based on the post-time-to-read block from the Gutenberg repository, which is still under development and not yet available in WordPress core.

This standalone version wraps the same idea with a render callback in PHP for full compatibility and performance.


✨ Features

  • Dynamic calculation based on post content
  • Shows reading time both in frontend and editor
  • Server-side rendering (render_callback) for performance
  • Lightweight, uses only @wordpress/scripts
  • Built for Full Site Editing (FSE) compatibility

🛠️ Installation

Option 1: Clone and build

git clone https://github.com/martatorredev/mtdev-post-time-to-read.git
cd mtdev-post-time-to-read
npm install
npm run build

Then, activate the plugin from your WordPress admin panel.


Option 2: Production use (no build required)

  1. Download the latest release ZIP or manually copy the plugin folder containing:

    • mtdev-post-time-to-read.php
    • The compiled build/ directory
  2. Upload the plugin to /wp-content/plugins/ in your WordPress installation.

  3. Activate the plugin from the dashboard.


🧪 Usage

  • Open the Site Editor and edit the Single Post or Query Loop template.
  • Insert the block named "Tiempo de lectura".
  • It will display something like:

    Tiempo de lectura: 3 minutos

  • The reading time is calculated using an average of 200 words per minute.

📁 Plugin structure

mtdev-post-time-to-read/
├── build/
│   ├── block.json
│   ├── index.js
│   ├── index.asset.php
│   └── style-index.css
├── mtdev-post-time-to-read.php
├── src/ (optional, for development only)
│   ├── edit.js
│   ├── index.js
│   ├── save.js
│   └── style.scss
├── package.json
├── README.md
├── license.txt
└── .gitignore

📚 Based on

This block is inspired by the official post-time-to-read block from the Gutenberg GitHub repository.
It has been adapted to work independently, with improved compatibility and PHP fallback rendering.


📝 License

This plugin is licensed under the GNU General Public License v2.0 or later.


🙋‍♀️ Author

Developed by Marta Torre
WordPress developer, contributor, and advocate for accessibility, privacy, and sustainable web development.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.0.0 latest
May 5, 2025 1 year ago
mtdev-post-time-to-read.zip
4