Petra
AI assistant for GrootMade
Hi! I'm Petra 👋 Ask me to help you find the perfect WP plugin, theme, or template kit.
forked from Hexagonal Reviews™
Polygon Insights is not affiliated with Hexagonal Reviews. The name and any related trademarks are used solely for nominative descriptive purposes.
This repository provides a concrete, working example of a reviews plugin built using hexagonal architecture (also known as ports and adapters). It is intended for developers looking to understand how to apply this architectural pattern to create more maintainable, testable, and framework-agnostic plugins. The project serves as a learning resource and a potential starting point for developers aiming to structure their own projects with clear separation of concerns.
Hexagonal Architecture Implementation: The core logic for managing reviews is isolated from the specific details of the content management system, using defined ports and adapters. This makes the business rules independent and easier to test. Testing Environment Ready: Includes a Docker setup for running unit and acceptance tests in an isolated environment. Codeception is configured for automated testing, and a standalone Selenium Chrome instance allows visual verification of browser tests. Build and Deployment Scripts: Provides Make commands to generate a production-ready plugin build by stripping test dependencies, and includes experimental scripts to adjust PHP version compatibility from 7.0 to 8.0. Coding Standards: Integrates WordPress Coding Standards via PHP CodeSniffer to enforce consistent code style, making the example easier to follow and contribute to. Functional Plugin: Beyond being an architectural example, it is a working plugin that adds a reviews system to posts via a shortcode, with an admin interface for managing those reviews.