8

# Is PHP search trends a WordPress phenomena?

Just the Gist

In a conference talk titled "Why isn't functional programming the Norm?", Richard Feldman looked at the most popular languages and saw among one of the explanations a "killer app" centered around Object Oriented Programming in most of them. Today we are not going deeper with functional programming, but addressing the "killer app" that made PHP. Richard argued that the killer app for PHP was WordPress (and Drupal), and lately that PHP was deeply intertwined with the popularity (or lack thereof) of WordPress. Today we are going to look at Google Trends for PHP and WordPress since 2016 until today and see how intertwined they really are.

Google tracks the number of searches for a particular keyword over time. Google Trends is a service that lets us see a summary of these searches. Google has changed how they track this data a couple of times, with the latest major overhaul being done in 2016. Comparing data prior to and after the 2016 overhaul may be a bit tricky so we are sticking to the post 2016 version. Most important though is that we can compare the "popularity" of two search terms that shares the same time period.

We need to note that only because a keyword appears popular on Google Trends does not mean that the subject that the keyword references is popular, as in being used by many people. For one, "how to cook a turkey" is way more searched than "how to cook pasta" and it's not because people eat more turkey.

Trend graphs are a quick way to illustrate the development of a key-indicator over time. When we put multiple trends on the same graph we can get an intuitive feel for how they relate to each other. But sometimes an apparent trend is just a fluctuation of random noise - meaning any trend and even a correlation with other trends are happenstance. So first off, let's have the trend graph and see if we can make heads or tails of this.

WordPress trend | |
---|---|

Runs test | P < 0.05 (2.25 · 10)^{-12} |

Linear regression | y = -0.52x + 66.62 |

PHP trend | |
---|---|

Runs test | P < 0.05 (4.33 · 10)^{-14} |

Linear regression | y = -0.74x + 98.13 |

Correlation | |
---|---|

Pearson's Correlation (r) | 0.93 |

As we can see from both these trends, the popularity for the keywords 'WordPress' and 'PHP' has been decreasing since 2016. The likelihood that this trend would be formed from random variation is very **very** small. And isn't both trends kind of similar? Perhaps they really are correlated, as we were wondering in the first place. When we compare the two trends on with a Pearson correlation ttest what do we get? 👀

With the Pearson correlation test on the two trends, we get a value of 0.92. This means that the two trends are highly correlated and follow each other in the same direction. When one goes up, so does the other. This shows us that so far, the success of the one has been success in the other, and vice versa. It's just in the ending of the graph that the story is deviating. Perhaps the release of PHP 8.0 caused a hubbub in the PHP community, and the popularity of the keyword 'PHP' increased at that time? Let's see if this was a fluke, or if it is something that continued in 2021!

We run another Pearson correlation on the two trends and get a value of -0.56. This is a moderate inverse correlation. We see a moderate positive trend for the interest in the keyword 'PHP' in 2021, but a moderate negative trend for the interest in the keyword 'WordPress' in 2021. What does this mean? It's hard to say, but for now PHP is going its own way. Maybe there's a swing-back to where they will be intertwined again, but that's something we will have to see in 2022.

Maybe this is just a one time event. When we cut a small enough piece of any time-frame, we are likely to find just the kind of development that we expect/want as long as there is not a perfect match. The long-term trend had a ridiculous amount of correlation, very close to 1. If we chose a cut-off point at about 2021-07 to 2021-12 we may just see the correlation swing back. Here's our stats for that 👇

WordPress trend | |
---|---|

Runs test | P < 0.05 (1.72 · 10)^{-4} |

Linear regression | y = -0.40x + 43.43 |

PHP trend | |
---|---|

Runs test | P > 0.05 (0.40) |

Linear regression | y = -0.44x + 92.54 |

Correlation | |
---|---|

Pearson's Correlation (r) | 0.38 |

What this tells us is that we actually can't say anything about a swing-back at this point. The PHP trend is likely to be random noise during this time-frame and that's why we can't say anything meaningful about the correlation.

How do you interpret the trends? Are there points in time where you see a reasonable explanation of why WordPress suddenly would generate more interest, or maybe there was a conference steering the keyword searches? Are there flaws in this analysis I should mention? Perhaps you have done a similar analysis and like to share? Comment below and let us know what you think ✍

8