Huge Performance Hit / Can you revise plugin?
-
Jacob I hesitated long whether to post this at all give how many “feature requests” you have to deal with here, makes me feel sorry!
But: I post it now because it may avoid a huge “plugin acceptance” hit for you going forward. I will briefly summarize my REPORT (not request) in two sections:
1) database problem
2) resources load (scripts and css)1) database problem
Seems no one noticed this (yet!): Your wppa plugin EXPLODES the database size, and all caused by your “sessions logging”. 15MB in a couple of days?? I am lost for words!
Your 973 or what admin options… is one thing.
But blowing up a standard wp database for NO BENEFIT WHATSOEVER that is a whole different matter.
How I found out: Whenever we had to import a backup, your plugin’s db table “wppa_sessions” through errors, like:Indexes for table
wp_wppa_session
—
ALTER TABLEwp_wppa_session
ADD PRIMARY KEY (id
),
ADD KEYsessionkey
(session
(20))MySQL said: Documentation
#1062 – Duplicate entry ‘0’ for key ‘PRIMARY’Looking at the database backup file, I saw that your “sessions” table is already bulking up the db by THIRTY MEGABYTES.
I then looked how to DELETE hundreds of thousands of rows in notepad ++. Like this: Right click, “Begin Select”
then “End Select”
then hit “Delete” ??This is how I quickly(?) got rid of your sessions table before importing, so as to avoid getting another import error like that.
==> You MUST drop your idea of logging every “session” into the database! Why at all?? Is there ANY value at all of logging “sessions”?
And even if YOU see value in that, at least DELETE your own sessions frequently. Automatically.
Plugin USERS do not seek to (know to) do that themselves. Just my tip. ??2) resources load (scripts and css)
On any page anything of your plugin is used, ALL OF THESE LOAD:a) Get loaded in header, thus above the fold!
<script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/jquery.js'></script> (for us, always there, for you, the only one needed?!) <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/jquery.form.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa-utils.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/core.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/widget.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/mouse.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/resizable.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/draggable.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/button.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/position.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-includes/js/jquery/ui/dialog.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/wppa-init.en.js'></script> b) Get loaded in footer, thus at least not also blocking page rendering! <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa-slideshow.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa-ajax-front.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa-popup.min.js'></script> <script type='text/javascript' src='https://domain.com/wp-content/plugins/wp-photo-album-plus/js/wppa-touch.min.js'></script> <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=AIzaSyCD0VIRFeVaYHe5WrYph3GTsYRCyk8NYA4&sensor=false'></script> <script type='text/javascript' src='https://domain.com/wp-content/uploads/wppa/temp/wppa.172.69.70.243.js'></script>
c) PLUS several inline scripts!
d) That was only the SCRIPTS… Then come all the CSS….
e) OMG! While researching the intricacies of your plugin my constant thought was “does he not think about efficiency….?”
Summary: Friendly, really 100% friendly, tip (else I wouldn’t bother to write here, you see): Stop attending to those temporary feature requests, and instead devise a permanent solution:
1) Load only what is absolutely necessary for the chosen functionality
2) Load all your plugin scripts in the footer, use defer, so AFTER the page has been rendered, UNLESS one is needed earlier. Then make it ONE.
3) Use wp-enqueue to load scripts and css. Like for example you “blindly” load //assets.pinterest.com/js/pinit.js without realizing that (likely) it IS already loaded by sth else, or it SHALL not be loaded at all.
Well, a user of your plugin can only select ALL social shares, so we had to turn it off altogether.4) Kill all session logging.
I know this helps. If only you take it serious.
- The topic ‘Huge Performance Hit / Can you revise plugin?’ is closed to new replies.