rename-wp-login icon indicating copy to clipboard operation
rename-wp-login copied to clipboard

Add integration and validation tools: TravisCI + CodeClimate & Some refactor fixes

Open JoryHogeveen opened this issue 7 years ago • 3 comments

First of all, thank you for this plugin! I use it in almost all my installations :)

I noticed this plugin isn't using any CI tools yet so could be a good way to check everything with different versions etc. before deploying on the WP repository. This PR will add all the required files to integrate with TravisCI and CodeClimate (both free tools for open source projects). You just need to create an acount on both with your GitHub login and enable it for this repository once the PR is merged.

I've also put some minor fixes in there (see "Other changes")

Checks done with TravisCI:

  • [x] PHP 7.1 -> Latest WP verson, both single and multisite
  • [x] PHP 7.0 -> Latest WP verson, both single and multisite
  • [x] PHP 5.6 + Latest WP verson (single installation)
  • [x] PHP hhvm + WP 4.4 (single installation)
  • [x] PHP 5.3 + WP 4.4 (single installation)

Allowed failures:

  • [x] PHP 5.2 + Latest WP verson (single installation)
  • [x] PHP 5.2 + WP 4.4 (single installation)
  • [x] PHP hhvm + WP 4.4 (single installation)

Checks done with CodeClimate

I haven't customized this yet.

PHP Mess Detector

  • [x] Design (all checks)
  • [x] CleanCode (all checks)
  • [x] CodeSize (all checks)
  • [x] Naming (all checks)

PHP Code Sniffer

  • [x] WordPress-Extra code standards https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
  • Config for CC is in .codeclimate.yml
  • Config for local is in tests/phpcs.xml (CC doesn't support this yet)

Other changes:

  • [x] Updated the "Tested up to" version to WP 4.7.x in readme.txt.
  • [x] Added README.md with CI and WP badges for GitHub.
  • [x] Fix load_plugin_textdomain hook (plugins_loaded is too early).
  • [x] Make the class Rename_WP_Login a singleton class.

TODO:

  • [ ] Create more PHP Unit Tests. Any ideas?
  • [ ] Fix other CodeClimate issues that come up (probably a second PR since the first scan will need to be triggered from the plugin master branch).
    • [ ] Some checks (like Nonces) could probably be disabled/ignored in this case.

JoryHogeveen avatar Mar 30 '17 16:03 JoryHogeveen

Amazing work Jory!

I'm a new contributor to this plugin and want to update it. I talked with Ella and she agreed. Would you be interested to help re-validate your work and implement it correctly?

I know it's been 2 years since you did all that but I think your work makes a lot of sense. I hope we can work together on this.

maximejobin avatar May 10 '19 13:05 maximejobin

Hi @maximajobin, Sounds good but I'm on holiday until the 25th!

JoryHogeveen avatar May 10 '19 13:05 JoryHogeveen

No problem. Let's connect when you get back!

maximejobin avatar May 10 '19 15:05 maximejobin