TextReadability by Robin S

Evaluates the readability of English text in textarea fields using various tests.

Text Readability

A module that uses the PHP Text Statistics class to evaluate the readability of English text in textarea fields according to various tests.

The available readability tests are:

The results of the enabled tests are displayed at the bottom of textarea fields – either when the "book" header icon is clicked, or at all times, depending on the option selected in the module configuration. An interpretive tooltip appears when you hover any of the result values.

Requires ProcessWire >= 3.0.246 and PHP >= 7.2.0

Image

Why is readability important?


Readable.com says:

Readability is partly important because Google considers it a key ranking factor. This is based on human behaviour on websites. If the average person finds website content too difficult to read, they’ll click elsewhere. Google loves readability because it improves UX. Content which is easier to understand will be easier to navigate. This will encourage readers to stay on your page. Which, in turn, improves bounce rates.

And:

A good score to work for, for the public, is a Flesch Kincaid grade level of 8. This is adequate for 85% of the public to easily understand.

The Wikipedia article on readability has useful information too.

Module configuration


  • Select which readability tests you want to enable. For each test there is an "about" link to information about the test.
  • Select whether the results of the enabled readability tests should be shown only when the header action icon is clicked (default), or if the results should always be shown.
  • For multi-language sites, select which ProcessWire language represents English (as the tests are only intended for English text).

Advanced


If you want to disable the readability test results for a particular textarea field you can hook TextReadability::allowReadabilityResults. Example:

$wire->addHookAfter('TextReadability::allowReadabilityResults', function(HookEvent $event) {
    $field = $event->arguments(0);
    $page = $event->arguments(1);
    // Disable readability results for the "body" field on the "home" page
    if($field->name === 'body' && $page->template == 'home') $event->return = false;
});

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #579
    The 579th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 14 June 2025
  • New ProcessWire admin redesign
    When you upgrade to ProcessWire 3.0.248 or newer (currently the dev branch), you’ll immediately notice something new and beautiful…
    Blog / 9 May 2025
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits