WP Manifestindependent plugin directory
manifest / content / hk-reading-time

HK Reading Time

Lightweight WordPress plugin that adds an estimated reading time to posts (filters, i18n, no bloat).

by HK Web Production Solution · github.com/dimitrihokonmoy/hk-reading-time · website

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/dimitrihokonmoy/hk-reading-time/archive/refs/heads/main.zip

Readme

HK Reading Time

A lightweight WordPress plugin that adds an estimated reading time to your posts — no settings screen, no database bloat, fully customizable via filters.

Un plugin WordPress léger qui ajoute un temps de lecture estimé à vos articles — sans page de réglages, sans surcharge de base de données, entièrement personnalisable via des filtres.


English

What it does

Prepends a simple X min read notice to the top of single posts. It hooks into the_content only on the main query of single posts, so it never runs in feeds, archives or widgets.

Installation

  1. Copy the hk-reading-time folder into wp-content/plugins/.
  2. Activate HK Reading Time in the Plugins screen.
  3. Open any post — the reading time shows at the top.

Developer filters

// Change the reading speed (default: 200 words per minute).
add_filter( 'hk_reading_time_words_per_minute', fn() => 230 );

// Customize the label.
add_filter( 'hk_reading_time_label', function ( string $label, int $minutes ): string {
    return sprintf( '⏱ %d min de lecture', $minutes );
}, 10, 2 );

Quality & standards

  • strict_types, namespaced, single-responsibility class.
  • WordPress Coding Standards: output escaped (esc_html), ABSPATH guard, i18n (_n, text domain).
  • Multibyte-safe word counting.
  • Clean uninstall.php, no leftover data.

Français

Ce que fait le plugin

Ajoute une mention X min read en haut de vos articles. Il s'accroche à the_content uniquement sur la requête principale des articles, donc jamais dans les flux, archives ou widgets.

Installation

  1. Copiez le dossier hk-reading-time dans wp-content/plugins/.
  2. Activez HK Reading Time dans l'écran Extensions.
  3. Ouvrez un article — le temps de lecture s'affiche en haut.

Filtres pour développeurs

// Changer la vitesse de lecture (défaut : 200 mots/minute).
add_filter( 'hk_reading_time_words_per_minute', fn() => 230 );

// Personnaliser le libellé.
add_filter( 'hk_reading_time_label', function ( string $label, int $minutes ): string {
    return sprintf( '⏱ %d min de lecture', $minutes );
}, 10, 2 );

Qualité & standards

  • strict_types, code dans un namespace, classe à responsabilité unique.
  • WordPress Coding Standards : sorties échappées (esc_html), garde ABSPATH, i18n (_n, text domain).
  • Comptage des mots compatible multi-octets (multibyte).
  • uninstall.php propre, aucune donnée résiduelle.

Author / Auteur

HK Web Production Solution — Dimitri Ho Kon Moy 📧 dimitrihokonmoy@gmail.com

License / Licence

GNU General Public License v2.0 or later — see LICENSE.txt.

Read the full README on GitHub →