-
Notifications
You must be signed in to change notification settings - Fork 37
Home
Welcome to the WP Statistics development guide! This page provides an overview of the codebase, including key classes, methods, architectural decisions, and resources to help you understand the structure of the WP Statistics plugin and contribute effectively.
Before diving into development, set up your development environment by following our comprehensive guide:
This guide covers:
- Cloning the repository
- Installing PHP and JavaScript dependencies
- Building assets with Gulp
- Running unit tests with PHPUnit
Enhance your development workflow using WP-CLI commands tailored for WP Statistics:
This document explains how to:
- Use bash scripts to insert dummy data
- Run WP-CLI commands for testing and development purposes
The WP Statistics plugin is designed with a modular architecture to handle various functionalities like visitor tracking, performance reporting, and more. It is structured into several core components:
- Service Layer: Manages application logic and data processing.
- Models: Handles data operations and interactions with the WordPress database.
-
Traits: Reusable code blocks like the
ObjectCacheTraitfor caching. - Helpers: Utility functions and classes for common tasks.
- Follow Coding Standards: Adhere to PSR-12 standards for PHP coding to maintain code quality.
- Error Handling: Ensure proper error handling using try-catch blocks.
- Testing: Write unit tests for new features and critical components.
For a complete list of guidelines, visit our Contributing Guide.
We welcome contributions to the WP Statistics project! To get started:
- Read the Contributing Guide: Familiarize yourself with our development processes and standards.
- Fork the Repository: Create your own fork to work on new features or bug fixes.
-
Create a New Branch: Use descriptive branch names like
feat-your-feature-name. - Submit a Pull Request: Once your changes are ready, submit a pull request for review.
For more information on how to get involved, visit our GitHub Issues page.