I post a lot of WordPress code and related stuff so I figured I should take a moment to mention, the code would be strictly for the WordPress.org self-hosted platform. Different from that, WordPress.com is a blog-hosting service utilizing the platform by the same name, which they created and open-sourced.
For a much more detailed breakdown of the differences see: https://premium.wpmudev.org/blog/wordpress-org-vs-wordpress-com-2015/
I hope that’s not too confusing. When working at WPMU DEV, we got some requests for refunds because people purchased plugins that they couldn’t use here on WordPress.com blogs. So I’m thinking it might be helpful to have more references like this short post.