WP-API / OAuth2

Connect applications to your WordPress site without ever giving away your password.
GNU General Public License v2.0
171 stars 41 forks source link

Coding standards fixes #58

Closed spacedmonkey closed 5 years ago

spacedmonkey commented 5 years ago

As I wish to use this project in a VIP GO site, I have taken it apon myself to fix the coding standards and security issues with this plugin.

I run this against VIP GO 2.0.0 and Core 2.0.0 standards. Many of the fixes are automated, but other I did by hand.

I also improved some of the comments (mainly the commons defining in the plugin).

One other thing, many of the filters and actions were not named correctly. Instead of removing them, I have added new filters and deprecated the old ones.

spacedmonkey commented 5 years ago

I also had to fix travis to that test run :(

Remove the comment rules for now, as that is a much larger issue, that should be managed here.

Looping in @rmccue @tfrommen in hopes of a review.

kadamwhite commented 5 years ago

Thanks for taking on this work!

I would like to ask you to pull this apart into two pull requests, one for coding standards changes and one for filter name changes. This will mean that some additional changes will be needed to disable CS sniffs in comments if they apply to the older filter syntax, but this is a lot to review in one go and the filter name change is much more impactful and will be surprising for existing users of the plugin; we’ll be able to move much faster on the individual pieces if they’re split out.

Thanks!

spacedmonkey commented 5 years ago

Thanks for the feedback @kadamwhite .

I have broken up this PR into 2. There is #59 for the filter names.

I know it is a a lot of code, but you can see the linters passing in travis now, meaning at least the code is valid.