Plugin Slows Down Website (Confirmed)
-
Hi there,
Great plugin! Unfortunately, it injects bloatware that slows down our website loading speed. Plugin has too much “fat.” Others in this forum have expressed the same concern.
The Issue:
(1) EC loads JS and CSS files on all of our website pages. Why? It should only load these files on pages that use the calendar functions. For example, EC loads the following files on all pages:
/wp-content/plugins/the-events-calendar/common/src/resources/css/tooltip.min.css
/wp-content/plugins/the-events-calendar/src/resources/css/admin-menu.min.css
(2) Customization is great and so are the codes provided by Modern Tribe. Unfortunately, EC’s architecture has forced us to develop and insert numerous CSS styling changes to our website in order to get a decent display.
(3) The plugin has too many “hooks” (back-end website queries).
The Fix:
Our website loading speed dropped dramatically after performing the following:
(1) We disabled all unnecessary JS and CSS codes injected by EC (per page basis) using the plugin, Perfmatters. Other similar (free) plugins are out there that can do the same.
(2) We disabled the REST API (WP-JSON) code injected by EC using the following solution:
https://theeventscalendar.com/support/forums/topic/how-disable-wp-json-of-tribe-events/
(3) We added the following code to our WP-CONFIG.PHP file: (NOTE: You will need to customize info below to suit your website)
define('WP_HTTP_BLOCK_EXTERNAL', true); define('WP_ACCESSIBLE_HOSTS', '*.www.ads-software.com, *.theme-fusion.com, theme-fusion.com, *.envato.com, wp-rocket.me, *.ithemes.com, *.googleapis.com, *.gstatic.com, *.google-analytics.com, <strong>*.yourwebsite.com</strong>, *.cloudflare.com, *.google.com, *.gtranslate.io, *.paypal.com, *.sucuri.net, *.siteground.com, *.sgcpanel.com, theeventscalendar.com');
(4) To slow down the number of plugin update queries, etc. we added the following PHP snippet to our website using the plugin, Code Snippets: (Note: Adding this code will block noted plugin update notices. However, with Code Snippets, we can deactivate this code, update EC, then reactivate the snippet it to re-block all active EC queries).
// Remove Update Notice for Forked Plugins function remove_update_notifications( $value ) { if ( isset( $value ) && is_object( $value ) ) { unset( $value->response[ 'the-events-calendar/the-events-calendar.php' ] ); unset( $value->response[ 'events-calendar-pro/events-calendar-pro.php' ] ); } return $value; } add_filter( 'site_transient_update_plugins', 'remove_update_notifications' );
After performing the above, our website loading speed dropped between .4 to 1.2 seconds!
Recommendations:
(1) Please revisit your plugin code to make it more efficient. Lines of code are continuously added to the plugin. Merging and minifying your files should help.
(2) Make EC Pro a stand-alone plugin. Currently, it depends on EC, which is understandable, but it’s a pain in the arse having to manage two plugins at the same time. In short, integrate EC’s code into EC Pro.
(3) Please update your KB to provide an article (or topic) dedicated on making EC and EC Pro run efficiently on users’ website(s). Ergo, one reason why we’re sharing above info.
Above has been tested many times. No issues.
Hope this helps everyone out there.
Cheers!
- The topic ‘Plugin Slows Down Website (Confirmed)’ is closed to new replies.