Title: Plugin to Fix HTML:TEXT Ratio
Last modified: January 30, 2023

---

# Plugin to Fix HTML:TEXT Ratio

 *  Resolved [driver49](https://wordpress.org/support/users/driver49/)
 * (@driver49)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/)
 * My Semrush Site Audit informs me that I have ~200 pages on my site with a TEXT:
   HTML ratio of less than 10%.
 * A lot of these pages have migrated over the years from an old TypePad blog to
   what is now the second or third iteration of the WordPress installation. I suspect
   a lot of that unwanted code comes from those earlier iterations (since I don’t
   have a similar problem with newer posts).
 * I am already running Autoptomize, but that’s not doing what I need here.
 * Is there a plugin that can look at the code in my old posts and delete the detritus?
 * Yeah, I know I’m looking for an easy fix but my experience with WP to date suggests
   there usually is one if I ask.
 * Thanks,
 * –PS
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-to-fix-htmltext-ratio%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16423353)
 * The HTML code in the frontend is generated by the theme you choose. You would
   have the possibility to “slim down” individual components of its templates via
   child theme. Or you can use another theme, which can handle less HTML code.
 * Optimization plugins like Autoptomize reduce at most the spelling of HTML codes,
   but not the structure that the theme generates since CSS properties depend on
   it. I don’t think you will find a plugin that manipulates the code in the way
   you want, because the styling might be broken.
 *  Thread Starter [driver49](https://wordpress.org/support/users/driver49/)
 * (@driver49)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16423680)
 * Thanks for the reply.
 * I kinda know that the code is coming from the theme. I’m using the Astra theme,
   and the posts I create with it are clean and none show up in the HTML:TEXT ratio
   warnings.
 * The problem near as I can tell is that all the posts that do show up in those
   warnings are really old and created with Typepad, and I think that is the source
   of the undesirable ratio, either directly from Typepad or as a consequence of
   the conversation to WordPress. Durned I know.
 * It occurs to me that I _could_ take the content from the original posts – without
   any of the underlying code – and recreate the posts inside of just Astra, but
   that would be a lot of work on a lot of posts of limited current value when all
   I’m trying to do is improve the ‘Site Health’ number.
 * Which, unfortunately, is precisely the kind of ‘busy’ work I tend to do instead
   of ‘real’ work…. 🤦🏻‍♂️
 * Thanks,
 * –PS
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16424301)
 * The article you linked is 95% source code from Astra. The remaining 5% is the
   text itself and that already contains minimalist HTML code, albeit with unnecessary
   Microsoft CSS classes. But they don’t necessarily bloat the code, since the bulk
   is generated by Astra, as I said.
 * You could try opening the old text in the Block Editor and saving it. Maybe this
   will remove the unnecessary CSS classes. But you won’t really reduce the source
   code.
 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16424349)
 * > The problem near as I can tell is that all the posts that do show up in those
   > warnings are really old and created with Typepad, and I think that is the source
   > of the undesirable ratio, either directly from Typepad or as a consequence 
   > of the conversation to WordPress. Durned I know.
 * The legacy Typepad stuff only appear after the `<body>` tag. But that’s already**
   two-thirds of the way down** the HTML view of your homepage. From the top up 
   to this two-thirds point where the `<body>` tag begins **is mostly full of CSS
   and JS code from the Astra theme.**
 * Also, and I feel like I’m beginning to sound like a broken record here, you should
   always take these tools and their recommendations for what they are: mere tools.
   You need to add your human judgement to these recommendations and decide whether
   to bother “fixing” what they report or not.
 * Many of these same tools recommend inlining CSS and JS. The idea is to avoid 
   the extra HTTP trips to load the external files, thereby speeding up the site(
   that’s the theory). It seems that’s what Astra is doing here.
 * But if you’re going to inline all your CSS and JS (some would even convert small
   decorative images to ginormous blobs of inline data URIs), then you’re necessarily
   going to have a very high HTML-to-content ratio!
 * ![](https://i0.wp.com/i.snipboard.io/0yk9GM.jpg?ssl=1)
 *  Thread Starter [driver49](https://wordpress.org/support/users/driver49/)
 * (@driver49)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16429499)
 * > ‘Also, and I feel like I’m beginning to sound like a broken record here, you
   > should always take these tools and their recommendations for what they are:
   > mere tools. You need to add your human judgement to these recommendations and
   > decide whether to bother “fixing” what they report or not.
 * That’s some sage counsel there. I appreciate your taking the time to dive into
   the code and disabuse me of my misconception re: the source of the wonky ratio.
   I think I’ll just mark this one ‘resolved’ and move on to the next dilemma…. 
   🥴
 * Thanks,
 * –PS

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin to Fix HTML:TEXT Ratio’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [typepad](https://wordpress.org/support/topic-tag/typepad/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [driver49](https://wordpress.org/support/users/driver49/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/plugin-to-fix-htmltext-ratio/#post-16429499)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
