Contributing to NectarPress¶
Thank you for your interest in improving NectarPress! This guide covers how to report bugs, suggest features, and submit code contributions.
Ways to Contribute¶
| Type | How |
|---|---|
| Bug report | Open a GitHub Issue |
| Feature request | Open a GitHub Discussion |
| Documentation fix | Click "Edit this page" on any docs page |
| Code contribution | Fork → branch → PR (see below) |
| Translation | Contact translations@nectardigit.com |
Code Contribution Workflow¶
1. Fork and clone¶
2. Install dependencies¶
3. Create a branch¶
Use the convention type/short-description:
git checkout -b fix/wizard-nonce-validation
git checkout -b feat/nepali-calendar-widget
git checkout -b docs/add-khalti-setup-guide
4. Make your changes¶
- Follow WordPress Coding Standards
- Run PHPCS before committing:
composer lint - Run PHPStan:
composer analyse - Run tests:
composer test
5. Commit¶
Commit message format: type: short description (lowercase, imperative mood)
Types: feat, fix, docs, style, refactor, test, chore
6. Open a Pull Request¶
All PRs require:
- [ ] Description of what changed and why
- [ ] Reference to related issue (
Fixes #123) - [ ] Tests pass (
composer test) - [ ] PHPCS passes (
composer lint) - [ ] No secrets, credentials, or
.envvalues committed
Code Style¶
NectarPress follows the WordPress PHP Coding Standards with these additions:
nectarpress_prefix on all public functionsNECTARPRESS_prefix on all constantsNectarPress_prefix on all class namesnp-ornpwz-CSS class prefixes (theme front-end / wizard)- Short-name aliases (
np_*) live exclusively inincludes/np-aliases.php
PHP version target¶
PHP 7.4+ (no PHP 8-only syntax in public API methods). Internal-only methods may use PHP 8 features.
Running Tests¶
# Unit tests (PHPUnit)
composer test
# Static analysis
composer analyse
# Coding standards
composer lint
# Fix auto-fixable CS issues
composer lint:fix
Tests live in tests/Unit/. Functional tests use WP_Mock — no live WordPress required.
Documentation Contributions¶
Docs live in docs/ and are built with MkDocs Material.
pip install mkdocs-material mkdocs-minify-plugin
mkdocs serve # live-reload at http://127.0.0.1:8000
For new pages:
- Create
docs/your-page.md - Add it to the
nav:section ofmkdocs.yml - Keep content concise — link out to external references rather than duplicating them
Security Vulnerabilities¶
Do not open a public GitHub Issue for security vulnerabilities.
Report privately to security@nectardigit.com. We respond within 72 hours and follow responsible disclosure (90-day embargo before public disclosure).
License¶
By contributing, you agree your contributions are licensed under the same license as NectarPress (GPL-2.0 for open-source portions, proprietary for the license-enforcement layer). See LICENSE.txt and EULA.txt for details.