RFG’s WordPress plugin and performance

RealFaviconGenerator’s favicon plugin for WordPress is the most convenient way to install a favicon in a WordPress site with RFG. But it regularly raises a question: how does the plugin affect performance? This is a legit question. You certainly don’t want to slow down your site just for a neat favicon.

TL; DR

RFG’s plugin itself doesn’t affect the performance of a WordPress site. The public side was designed to be very lightweight, so your visitors won’t notice any change before/after you installed the plugin.

As an aside: for the favicon to work, the plugin must be kept activated. As soon as you deactivate it, the favicon markups are not injected anymore. From your visitors point of view, this is as if you didn’t have favicon at all.

Benchmark

Never trust a developer who simply tells you he has written efficient code. Ask for a proof.

The methodology for this benchmark is:

  • Install a vanilla WordPress 4.6.1. No additional plugins or theme, no fresh content. Just an up-and-running, minimalist WordPress.
  • Benchmark the homepage and the default post page.
  • Install and activate Favicon by RealFaviconGenerator. Setup a favicon.
  • Benchmark the homepage and the default post page again.

… and compare the “without plugin” and “with plugin” results.

As expected, the site is a bit slower when the plugin is installed and active. This is normal: it asks for a bit of processing time to inject the favicon markups in the page and the page becomes larger, taking more time to be transmitted.

And now, some figures. The original homepage is 11497 bytes large. In my benchmark, the average time per request is 26.366ms. Once the favicon is setup, the homepage is 12304 bytes large, a 7% gain. That sounds like a huge increase but it’s not considering how light the original homepage is. Plus, the plugin had no real influence at that point: this is just a reasonable amount of code to declare a Touch icon, a manifest file for Android, etc. Any other solution (like hacking wp-header.php) would do the same. What about the response time? With the favicon installed, it is 26.669ms. The increase is about 1.1%, a small increase probably mostly due to the additional amount of transmitted data.

As a comparison, when Yoast SEO is installed (along with Favicon by RealFaviconGenerator, still active), the page is now 13533 bytes (17.7% increase) and the average response time is 35.597ms (35% increase). This time, the augmentation is significant, although widely accepted across the WordPress community.

Appendix

The following outputs were obtained by running ab -n 1000 -c 5 http://mylocalsite.com/ or ab -n 1000 -c 5 http://mylocalsite.com/index.php/2016/09/19/hello-world/.

Vanilly WordPress

Fresh install, absolutely no plugin.

Homepage

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/
Document Length:        11497 bytes

Concurrency Level:      5
Time taken for tests:   26.366 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      11784000 bytes
HTML transferred:       11497000 bytes
Requests per second:    37.93 [#/sec] (mean)
Time per request:       131.832 [ms] (mean)
Time per request:       26.366 [ms] (mean, across all concurrent requests)
Transfer rate:          436.46 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       4
Processing:    57  132  11.6    130     249
Waiting:       50   91  12.1     90     171
Total:         57  132  11.6    130     249

Percentage of the requests served within a certain time (ms)
  50%    130
  66%    134
  75%    136
  80%    138
  90%    144
  95%    151
  98%    160
  99%    168
 100%    249 (longest request)

Default post

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/index.php/2016/09/19/hello-world/
Document Length:        15825 bytes

Concurrency Level:      5
Time taken for tests:   30.330 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      16239000 bytes
HTML transferred:       15825000 bytes
Requests per second:    32.97 [#/sec] (mean)
Time per request:       151.652 [ms] (mean)
Time per request:       30.330 [ms] (mean, across all concurrent requests)
Transfer rate:          522.85 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       3
Processing:    57  151  13.6    149     284
Waiting:       48   93  12.1     91     212
Total:         57  152  13.6    149     284

Percentage of the requests served within a certain time (ms)
  50%    149
  66%    153
  75%    156
  80%    159
  90%    166
  95%    173
  98%    186
  99%    213
 100%    284 (longest request)

WordPress + Favicon by RealFaviconGenerator

Favicon by RealFaviconGenerator is installed and enabled.

Homepage

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/
Document Length:        12304 bytes

Concurrency Level:      5
Time taken for tests:   26.669 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      12591000 bytes
HTML transferred:       12304000 bytes
Requests per second:    37.50 [#/sec] (mean)
Time per request:       133.345 [ms] (mean)
Time per request:       26.669 [ms] (mean, across all concurrent requests)
Transfer rate:          461.05 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       6
Processing:    78  133   9.4    132     210
Waiting:       60   85   9.3     85     165
Total:         78  133   9.4    132     215

Percentage of the requests served within a certain time (ms)
  50%    132
  66%    136
  75%    138
  80%    140
  90%    144
  95%    148
  98%    153
  99%    160
 100%    215 (longest request)

Default post

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/index.php/2016/09/19/hello-world/
Document Length:        16632 bytes

Concurrency Level:      5
Time taken for tests:   30.391 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      17046000 bytes
HTML transferred:       16632000 bytes
Requests per second:    32.90 [#/sec] (mean)
Time per request:       151.955 [ms] (mean)
Time per request:       30.391 [ms] (mean, across all concurrent requests)
Transfer rate:          547.74 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   113  152  12.4    150     246
Waiting:       71   94  11.5     93     189
Total:        113  152  12.4    150     246

Percentage of the requests served within a certain time (ms)
  50%    150
  66%    154
  75%    156
  80%    157
  90%    163
  95%    169
  98%    192
  99%    208
 100%    246 (longest request)

WordPress + Favicon by RealFaviconGenerator + Yoast SEO

Favicon by RealFaviconGenerator and Yoast SEO are installed and enabled.

Homepage

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/
Document Length:        13533 bytes

Concurrency Level:      5
Time taken for tests:   35.597 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      13820000 bytes
HTML transferred:       13533000 bytes
Requests per second:    28.09 [#/sec] (mean)
Time per request:       177.985 [ms] (mean)
Time per request:       35.597 [ms] (mean, across all concurrent requests)
Transfer rate:          379.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       4
Processing:   116  178  13.6    176     262
Waiting:       87  114  12.1    112     186
Total:        116  178  13.6    176     262

Percentage of the requests served within a certain time (ms)
  50%    176
  66%    180
  75%    184
  80%    185
  90%    194
  95%    200
  98%    220
  99%    227
 100%    262 (longest request)

Default post

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 10.0.0.87 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.7
Server Hostname:        10.0.0.87
Server Port:            80

Document Path:          /wordpress4benchmark/index.php/2016/09/19/hello-world/
Document Length:        17630 bytes

Concurrency Level:      5
Time taken for tests:   40.536 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      18044000 bytes
HTML transferred:       17630000 bytes
Requests per second:    24.67 [#/sec] (mean)
Time per request:       202.682 [ms] (mean)
Time per request:       40.536 [ms] (mean, across all concurrent requests)
Transfer rate:          434.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   128  203  14.5    201     289
Waiting:       90  122  12.4    121     199
Total:        128  203  14.5    201     289

Percentage of the requests served within a certain time (ms)
  50%    201
  66%    205
  75%    209
  80%    212
  90%    220
  95%    229
  98%    242
  99%    250
 100%    289 (longest request)

One thought on “RFG’s WordPress plugin and performance

  1. Pingback: Why does the Favicon by RealFaviconGenerator WordPress plugin need to be activated all the time? - Favicon's blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*