• Resolved hmijail

    (@hmijail)


    I’m trying to fix a WP site health warning. It shows that there’s 2 OMGF-related autoloads:

    omgf_optimized_fonts_frontend = 780KB

    omgf_available_used_subsets = 30KB

    Looking at previous issues in here about autoloads, I see that 79KB seemed to be considered “massive”, sooo I’m assuming this is not normal?

    The OMGF settings page shows that there’s 2 stylesheets, whose names connect to my theme. One of the stylesheets contains 2 fonts, the other about 700! So I’m suspecting that the theme creators should maybe fix something? Any advice?

    I tried emptying the cache, but after a moment everything looks the same.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    That’s certainly a lot!

    And 700 fonts in 1 stylesheet doesn’t make any sense. So, yes, I agree with your assumption that the fix for this is on the site of the theme creator. Are you certain it’s the theme? It might also be one of your plugins. I’ve seen plugins that just load all Google Fonts, just in case, instead of providing means to select them.

    Thread Starter hmijail

    (@hmijail)

    My theme is named Blogus, and the 2nd stylesheet is named “blogus-google-fonts”. So sounds like they took the “just in case” route.

    I’ll try to ask them, though it’s a free theme, and I see a previous thread mentioning the hundreds of google fonts problem that got ignored.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Yup. I opened the example on their wp.org listing and that’s exactly what it does:

    View post on imgur.com

    That’s a 800KB stylesheet, just for Google Fonts. That’s terrible for performance.

    Thread Starter hmijail

    (@hmijail)

    While hoping that the theme devs fix it, I set the OMGF option to delete its information on uninstall, and then disabled and uninstalled it.

    But the Site Health check still shows the “omgf_optimized_fonts_frontend” entry with 779KB. Should I just delete it manually, with e.g. the Options View plugin?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    It’s no use to delete it, because it’ll return as soon as OMGF detects that stylesheet again. The reason it’s that size, is because the stylesheet is that big.

    After the theme devs fixed it, update the theme, empty OMGF’s cache and this row in your database will be refreshed and not be that big.

    Thread Starter hmijail

    (@hmijail)

    Oh, but OMGF is right now uninstalled. My understanding was that it would delete its DB stuff automatically, but it didn’t, that’s why I thought of deleting it manually.

    Apart from that… I just thought that maybe there’s some hacking I could do myself to remove the unused google fonts. I thought “wordpress child themes”, and found your own page about it.

    Ironically, its recommendation is to install OMGF. So, being a non-frontend person, I’m trying to wrap my head about the situation.

    Is it a fair summary to say that OMGF helps in this situation by stopping 700 fonts from being loaded by the end user… and possibly prioritizing the fonts that do get loaded… but at the same time it makes the server potentially slower because of the autoloaded option listing those 700 fonts?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Oh, but OMGF is right now uninstalled. My understanding was that it would delete its DB stuff automatically, but it didn’t, that’s why I thought of deleting it manually.

    Check “Remove Settings/Files At Uninstall” under Advanced Settings. That’ll remove all DB entries when you deactivate/uninstall the plugin.

    Apart from that… I just thought that maybe there’s some hacking I could do myself to remove the unused google fonts. I thought “wordpress child themes”, and found your own page about it.

    If you’re planning to do some hacking yourself, look for a filter in your theme that’ll allow you to overwrite the Google Fonts URL and only include the fonts you actually need.

    Ironically, its recommendation is to install OMGF. So, being a non-frontend person, I’m trying to wrap my head about the situation.

    Who recommends this? I’m not understand what you’re saying here.

    Is it a fair summary to say that OMGF helps in this situation by stopping 700 fonts from being loaded by the end user… and possibly prioritizing the fonts that do get loaded… but at the same time it makes the server potentially slower because of the autoloaded option listing those 700 fonts?

    No. In this case, OMGF isn’t helping the situation. It can’t help it. Regardless of “where” these 700 fonts are loaded, it’s terrible for performance. It’s like trying to apply a band-aid on a bleeding artery. This needs fixing on the theme’s side. That’s all there is to it.

    Thread Starter hmijail

    (@hmijail)

    Check “Remove Settings/Files At Uninstall” under Advanced Settings. That’ll remove all DB entries when you deactivate/uninstall the plugin.

    I did that. It didn’t work. Anyway, I tried deleting the entry manually and that worked.

    Who recommends this? I’m not understand what you’re saying here.

    If I understand correctly, your page recommends OMGF to remove google fonts from a theme? Again, I’m not a frontend person, so I might be missing something.

    If the devs don’t react, I will try to follow your instructions to modify the theme. Thank you!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I did that. It didn’t work. Anyway, I tried deleting the entry manually and that worked.

    Ok! Thanks for notifying me! I’ll look into that.

    If I understand correctly, your page recommends OMGF to remove google fonts from a theme? Again, I’m not a frontend person, so I might be missing something.

    Ah, gotcha! Yes, in most cases I would recommend OMGF to remove Google Fonts. But with a stylesheet this large it’ll add so much database bloat, and checking remove for all of them would add even more. So, in your case, no, I would suggest resolving this at the core of the problem. ??

    Thread Starter hmijail

    (@hmijail)

    FYI: the developer made some small changes, which don’t look to me related to this problem. In case it was fixed anyway, I tried reinstalling OMGF to see if the autoloads problem reappeared; but when I clicked the “start optimization” link, I got this error after a while:

    OMGF encountered an error while fetching this site’s frontend HTML: http_request_failed – cURL error 28: Operation timed out after 60002 milliseconds with 0 bytes received

    On reloading the settings page, it was populated with the 700 google fonts. And Site Health again flagged a big autoload.

    So I enabled the option for OMGF to delete its data on uninstall, uninstalled OMGF, and again it failed to remove the autoload. Maybe it’s somehow connected to that initial error?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I just opened the live preview on the Blogus theme page, and it still loads the 800KB stylesheet. So, it’s not fixed.

    If you never had the timeout before, it could’ve been a temporary server glitch, but also, I can imagine that it might be hard for some servers to go through 800 Google Fonts and build them into objects, etc. for OMGF to process them.

    I did recently find a bug in OMGF that didn’t remove the omgf_optimized_fonts row when the cache was emptied (or the uninstall script was ran), so that’s explaning the behavior you’re illustrating. This bug’ll be fixed in the next release.

    But, for your initial issue, there’s really nothing I can do, aside from referring you to the theme developer.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.