Skip to content

Latest commit

 

History

History
172 lines (128 loc) · 3.98 KB

File metadata and controls

172 lines (128 loc) · 3.98 KB

Contributing to EZCONTACTFORM WordPress Plugin

Thank you for your interest in contributing! This document provides guidelines for contributing to the project.

Code of Conduct

Be respectful, inclusive, and professional in all interactions.

How to Contribute

Reporting Bugs

  1. Check if the bug has already been reported in Issues
  2. If not, create a new issue with:
    • Clear title and description
    • Steps to reproduce
    • Expected vs actual behavior
    • WordPress version, PHP version, and plugin version
    • Browser and OS information (if frontend issue)
    • Screenshots if applicable

Suggesting Features

  1. Check if the feature has already been suggested
  2. Create a new issue with:
    • Clear title and description
    • Use case and benefits
    • Proposed implementation (optional)

Pull Requests

  1. Fork the repository and create a feature branch

    git checkout -b feature/your-feature-name
  2. Make your changes

    • Follow WordPress coding standards
    • Add comments for complex logic
    • Keep functions focused and small
  3. Test thoroughly

    • Test with WordPress 5.0+
    • Test with multiple themes
    • Test in Chrome, Firefox, Safari
    • Test on mobile devices
    • Check for PHP warnings/errors
  4. Commit your changes

    git commit -m "Add feature: your feature description"
  5. Push to your fork

    git push origin feature/your-feature-name
  6. Open a Pull Request

    • Provide clear description of changes
    • Reference any related issues
    • Include screenshots for UI changes

Development Setup

Prerequisites

  • Docker and Docker Compose
  • Git
  • Code editor (VS Code recommended)

Local Development

# Clone your fork
git clone https://github.com/YOUR_USERNAME/wordpress-plugin.git
cd wordpress-plugin

# Start WordPress environment
docker-compose up -d

# Access WordPress at http://localhost:8888

Code Style

Follow WordPress PHP Coding Standards:

  • Use tabs for indentation
  • Use single quotes for strings (unless interpolating)
  • Add spaces around operators
  • Prefix function names with ezcontactform_
  • Use proper PHPDoc blocks

Good:

function ezcontactform_get_setting( $key ) {
    $settings = get_option( 'ezcontactform_settings', array() );
    return isset( $settings[ $key ] ) ? $settings[ $key ] : null;
}

Bad:

function getSetting($key){
  $settings=get_option("ezcontactform_settings",array());
  return isset($settings[$key])?$settings[$key]:null;
}

Testing Checklist

Before submitting a PR, ensure:

  • No PHP warnings or errors
  • No JavaScript console errors
  • Code follows WordPress standards
  • Tested on WordPress 5.0+
  • Tested on PHP 7.4+
  • Works with default WordPress themes
  • Forms display correctly
  • Forms submit successfully
  • Settings save correctly
  • No conflicts with common plugins

Areas for Contribution

We welcome contributions in these areas:

Bug Fixes

  • Fix reported issues
  • Improve error handling
  • Security improvements

Features

  • New display options
  • Additional settings
  • Integration with other plugins
  • Translation support

Documentation

  • Improve README
  • Add code examples
  • Create video tutorials
  • Update screenshots

Testing

  • Add automated tests
  • Test with different themes
  • Cross-browser testing
  • Accessibility testing

Performance

  • Optimize script loading
  • Reduce CSS size
  • Improve caching

Questions?

If you have questions about contributing, feel free to:

License

By contributing, you agree that your contributions will be licensed under the MIT License.


Thank you for contributing! 🎉