Bug reports, code contributions, and general feedback are very welcome. These should be submitted through the GitHub repository. Development happens in the develop
branch, and any pull requests should be made against that branch please.
- Reviews on WordPress.org
- Reporting Security Issues
- Inclusivity and Code of Conduct
- Setting up Locally
- Running the Tests
- Releasing a New Version
- Ethical Open Source
If you enjoy using User Switching I would greatly appreciate it if you left a positive review on the WordPress.org Plugin Directory. This is the fastest and easiest way to contribute to User Switching 😄.
If you discover a security issue in User Switching, please report it to the security program on HackerOne. Do not report security issues on GitHub or the WordPress.org support forums. Thank you.
Contributions to User Switching are welcome from anyone. Whether you are new to Open Source or a seasoned veteran, all constructive contribution is welcome and I'll endeavour to support you when I can.
This project is released with a contributor code of conduct and by participating in this project you agree to abide by its terms. The code of conduct is nothing to worry about, if you are a respectful human being then all will be good.
You can clone this repo and activate it like a normal WordPress plugin. If you want to contribute to User Switching, you should install the developer dependencies in order to run the tests.
-
Install the PHP dependencies:
composer install
-
Install the Node dependencies:
npm install
-
Check the MySQL database credentials in the
tests/.env
file and amend them as necessary.
Important: Ensure you use a separate test database (eg. wordpress_test
) because, just like the WordPress test suite, the database will be wiped clean with every test run.
To run the whole test suite:
composer test
To run just the integration tests:
composer test:integration
To run just the coding standards checks:
composer test:phpcs
To run just the static analysis:
composer test:phpstan
To run just the acceptance tests:
composer test:acceptance
User Switching gets automatically deployed to the WordPress.org Plugin Directory whenever a new release is published on GitHub.
Assets such as screenshots and banners are stored in the .wordpress-org
directory. These get deployed as part of the automated release process too.
In order to deploy only changes to assets, push the change to the deploy
branch and they will be deployed if they're the only changes in the branch since the last release. This allows for the "Tested up to" value to be bumped as well as assets to be updated in between releases.
User Switching is considered Ethical Open Source because it meets all of the criteria of The Ethical Source Definition (ESD):
- It benefits the commons.
- It is created in the open.
- Its community is welcoming and just.
- It puts accessibility first.
- It prioritizes user safety.
- It protects user privacy.
- It encourages fair compensation.