Measure Jetpack
Arūnas Liuiza
It all started with a
blog post...
TIL
- Apparently, Jetpack is a contentious issue in WordPress Community ;) #wpdrama
- Some people hate it, others swear by it.
- Everybody has an opinion about it.
And what does the *DATA*
say about it all?
Well...
- There is not much of it.
- An interesting study was conducted by BruteProtect
- A part of Jetpack - clear conflict of interest
A proper study
- Conducted by an independent party;
- A clear, public methodology;
- Reproduceable results;
- Comparison to alternative plugins;
Parameters
System
- WordPress 4.6.1
- Jetpack 4.3.2
- Twenty Sixteen 1.2
- LEMP stack:
- Ubuntu 14.04.4 LTS
- nginx 1.4.6
- PHP 5.5.9
- MariaDB 5.5.47
- Digital Ocean droplet
- 1GB RAM
- 1 CPU
- 30GB SSD
- Nothing else running on it
Content
- From Wikipedia
- All countries
- All capitals
- Some cities
- 600+ posts in total
What was measured?
- Peak Memory Usage
- PHP Execution Time
- SQL Read Query Count
- SQL Write Query Count
- SQL Execution Time
- Local Script/Style Request Count
- Remote Sricpt/Style Request Count
- Remote HTTP GET Request Count
- Remote HTTP POST Request Count
How was it measured?
- A custom lightweight plugin
- Hooking in at 'shutdown' hook
- Loading home page 9 times
- Discard min and max values and count the average of remaining 7.
The RESULTS
Memory Usage
- Activated Jetpack:
- +0.47 Mb / +14.11%
- Activating a single Jetpack module:
- +0.76 Mb / +22.82% on average
- +0.69 Mb / +20.72% for Infinite Scroll (min)
- +1.09 Mb / +32.73% for Sharing (max)
-
Activated Recommended modules:
- +2.04 Mb / +61.26%
- Activated All modules:
- +2.451 Mb / +73.57%
All figures are relative to fresh WP install (3.33 Mb of peak memory usage)
Execution time
- Jetpack adds +0.076 s of load time on average.
- Big variations in results (+- 30%), so a bigger sample is needed for more reliable results.
All figures are relative to fresh WP install (0.1848 s execution time)
SQL
- Activated Jetpack
- +1 read query
-
+2 read queries
- Related posts, Custom CSS
-
+3 read queries
- Extra Widgets, Infinite Scroll
-
+7 read queries
- Recommended modules
-
+10 read queries
- All modules
Assets
- WordPress loads
- 6 internal scripts, 5 internal sytles, 1 external style
- Recommended modules add
-
- +1 internal, +1 external script, +2 internal styles
- All modules add
- +11 internal, +2 external scripts, +11 internal styles
- Culprit modules
- Infinite Scroll ( +5/0/+6)
- Gravatars ( +1/+1/0)
- Photon ( +1/0/0)
- Likes ( 0/0/+1)
Remote HTTP requests
Jetpack adds 0 new remote HTTP requests to home page loads.
Conclusions
What we've learned?
- Jetpack will add at least 0.5 Mb (and up to 2.5 Mb) of peak memory usage on home page of a WordPress site;
- There is an effect on execution times, too, but a bigger sample size is needed for reliable comparison;
- Only a handful of Jetpack modules load additional assets to WordPress home page;
- Jetpack adds no remote HTTP requests on WordPress home page;
What's next?
- Measure comparable alternative plugins;
- Run tests in module specific places (single post/admin screen/etc.);
- More data for execution time comparisons;
Main take-away
- If You want control and flexibility
-
There are a lot of plugins that do what Jetpack does
-
There are a lot of plugins that do what Jetpack does
- If You want stability
- Jetpack might be a great choice for you
Questions?
Measure Jetpack
By Arūnas Liuiza
Measure Jetpack
- 3,346