Support » Plugin: PWA for WP & AMP » Small Database Perfomance Suggestion for PWA for WP & AMP

  • I’m cleaning up my sites and checking on plugins which load unnecessary options via get_option() and PWA is loading autoptimize_cdn_url which only exists if another plugin is installed.

    You can see for yourself by using a plugin like https://wordpress.org/plugins/blackbar/ on a Localhost install or temporarily on a live site (I wouldn’t keep a plugin like this running long on a live site).

    It’s the file /admin/common-function.php line 309.

    $cdnUrl = get_option( 'autoptimize_cdn_url', '' );

    If a user hasn’t installed the relevant plugin it’s a wasted database query which has an impact on performance.

    You should wrap the code in a check for a loaded function or class from the autoptimize plugin so this database query is only checked when the autoptimize plugin is installed and active.

    Removing one database query is a tiny performance issue, but removing that database query means PWA isn’t adding to any strain on an over taxed server.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Small Database Perfomance Suggestion for PWA for WP & AMP’ is closed to new replies.