Thank you for your interest in contributing to the Crowdsignal plugin! This document provides guidelines and information for contributors.
- Docker and Docker Compose
- Node.js and npm
- PHP 7.4+ (recommended, minimum 5.6 for plugin compatibility)
- Composer
-
Start the development environment:
wp-env start
-
Access the local WordPress site:
- WordPress front end: http://localhost:8888
- WordPress admin: http://localhost:8888/wp-admin
- Username:
admin - Password:
password
-
Install dependencies:
npm install composer install
-
Build assets:
npm run build
The development environment uses @wordpress/env which provides:
- Latest WordPress on Latest PHP
- MySQL/MariaDB database
- Automatic plugin mounting - the current directory is mounted as a plugin
- Debug settings enabled for development
Configuration is stored in .wp-env.json:
- Debug logging enabled
- Script debugging enabled
- Development ports: 8888 (main), 8889 (tests)
-
Edit PHP files directly - changes are reflected immediately
-
For JavaScript/CSS changes, rebuild assets:
npm run build
The project follows WordPress Coding Standards. Before submitting any code:
-
Run PHP_CodeSniffer:
composer phpcs
-
Auto-fix coding standards issues:
composer phpcbf
We maintain both unit and integration tests. Always run tests before submitting changes:
-
Start environment with Xdebug for coverage:
wp-env start --xdebug=coverage
-
Run all tests:
wp-env run tests-cli --env-cwd=wp-content/plugins/crowdsignal-plugin composer test -
Run specific test suites:
# Unit tests only composer test:unit # Integration tests only composer test:integration
When reporting bugs or requesting features:
- Search existing issues first to avoid duplicates
- Use clear, descriptive titles
- Provide detailed reproduction steps for bugs
- Include environment information (WordPress version, PHP version, etc.)
- Add screenshots or error logs when relevant
- Fork the repository and create a feature branch from
main - Follow the coding standards outlined above
- Write or update tests for your changes
- Ensure all tests pass before submitting
- Write clear commit messages following Conventional Commits
- Update documentation if your changes affect user-facing functionality
- Keep pull requests focused - one feature or fix per PR
- All submissions require review before merging
- Reviewers may request changes or improvements
- Address feedback promptly and push updates to your branch
- Once approved, maintainers will merge your contribution
Use clear, descriptive commit messages:
type(scope): brief description
Longer explanation if needed, including:
- What changed and why
- Any breaking changes
- References to issues (#123)
Examples:
fix(polls): resolve XSS vulnerability in poll titlesfeat(ratings): add support for custom rating scalesdocs(readme): update installation instructions
polldaddy.php- Main plugin file (filename preserved for compatibility)polldaddy-client.php- API clientrating.php- Ratings functionalitypartials/- Admin interface templatestests/- Unit and integration testscss/- Stylesheetsjs/- JavaScript files
Note: This plugin maintains some legacy "polldaddy" naming in filenames and code for backward compatibility. While the service is now "Crowdsignal," changing these references would be a breaking change.
Help translate the plugin:
- Visit the WordPress.org translation site
- Some strings require translation through Crowdsignal.com language packs
- Update version numbers in relevant files
- Update changelog in
readme.txt - Run full test suite
- Build and package for release
- Deploy to WordPress.org repository
- Documentation: Check this file and
readme.txt - Issues: Use GitHub Issues for bug reports and feature requests
- Support: Visit Crowdsignal Support
- Community: WordPress.org support forums
This project is licensed under GPL-2.0-or-later. By contributing, you agree that your contributions will be licensed under the same terms.
wp-env stopThis will stop the WordPress development environment.