Update: I did a bit more filtering and checking and the numbers dropped to around 76%. Head down past the caveats for more.

This question gets asked quite a lot around Mozilla now that we've been working on WebExtensions for a while. We've been aiming for some sort of Chrome parity. A while back I wrote a script that I used on arewewebextensionsyet.com. That produced a percentage of WebExtensions, but I always felt nervous about talking about it because there so many caveats it never felt accurate.

One of the major caveats was that the sample size of extensions I had from the Chrome store of 10,000 felt too small (that sample is the one used on arewewebextensionsyet.com currently). This week I used this project to parse the sitemap on the Chrome store and get 100,000 extensions and apps. A much more satisfying amount.

After stripping out apps, I then ran some scripts over those extensions to see how many would work in Firefox Nightly. Here's the output:

Number

Percentage

Extensions

71,551

Missing one or more permission

5,463

7.64%

Missing one or more API

6,542

9.14%

Easily convertable

62,792

87.76%

And here is an explanation of the long list of caveats and why I still am very cautious about this number.

Caveats

This doesn't mean they can run out of the box, it means they are easily convertable. Possibly the most obvious reason is that some of these extensions contain deprecated methods. Firefox hasn't implemented those deprecated methods. But if the developer updates their extension to use the new methods it will work in both Firefox and Chrome.

This method filters out apps, or extensions which use apps API, which can be a little heavy handed and hard for extension users to spot.

This method just looks at APIs and permissions. Which means that features that are required beyond those two methods are not covered. Web APIs for example aren't tested.

Whilst we've got many APIs, some of them may not be implemented exactly the same as Chrome. Or have bugs. That can cause some extensions to have some problems.

A grep of chrome.* for APIs reveals domains, typos, comments and some just wierd strings. If you ignore those there would probably be even more that work.

This uses data from Firefox Nightly, if you use earlier versions of Firefox, you'll get less. Also not every single API is ready for release yet.

The result of these caveats is a list of variables which you can see in the code. A more perfect scenario would be to download the extension, try loading it into Firefox and then seeing the result. But automating and building it all out would take more than one hour or two of hacking. If anyone wants to try to do that for 100,000 extensions let me know.

So what can you take from the number 87.76%? Some comfort that its probably somewhere around that number. I can say with a lot of confidence that over 75% of extensions are easily convertable to Firefox. A bit less confidence that over 85% are.

That sounds pretty good to me though and a credit to the hard work the team has put in this year.

Update: November 22nd

A couple of more issues or caveats were pointed out to me:

This list of add-ons includes themes, those are possible in Firefox already and although its related slightly different. Because themes don't use APIs and are different they should probably be excluded. By the way, there is a plan to get new theming support in Firefox. This dropped our total number of extensions examined down.

This does not include manifest keys. Some elements of the manifest do not need an API or permission so if we don't support them we still aren't at parity. All the big ones, we already have bugs and plans for, but just to be complete I included these.