crealoz/easy-audit-free
最新稳定版本:0.4.5
Composer 安装命令:
composer require crealoz/easy-audit-free
包简介
A tool that permits to run different types of audits in Magento 2.
README 文档
README
EasyAudit is a Magento 2 module that audits your codebase and configuration to highlight potential issues and provide actionable insights. It helps developers and site owners improve Magento applications' quality, performance, and maintainability.
Stack and Project Overview
- Language: PHP (>= 8.1)
- Framework / Platform: Magento 2 (module type: magento2-module)
- Package manager: Composer
- Tests: PHPUnit
- Entry points:
- Magento CLI command:
crealoz:audit:run - Magento Admin UI (grids and configuration)
- Magento CLI command:
For more details on the processors used in EasyAudit, see docs/existing-processors.md.
Requirements
From composer.json and codebase:
- PHP: ^8.1
- Magento Framework (Magento 2)
- PHP extensions: ext-simplexml, ext-zip, ext-curl
- Composer
Note: A working Magento 2 instance is required to use the module (both CLI and Admin UI).
Installation
Install via Composer from Packagist:
composer require crealoz/easy-audit-free
Then enable and register the module in Magento:
php bin/magento module:enable Crealoz_EasyAudit php bin/magento setup:upgrade php bin/magento cache:flush
Manual installation (for contributors):
- Clone the repository into your Magento installation under app/code/Crealoz/EasyAudit or use path mapping via composer.
- Install PHP dependencies if needed (usually handled at the Magento root):
composer install
- Enable the module as above.
Usage
You can run EasyAudit from the Magento CLI or via the Admin UI.
-
CLI command (correct command name):
php bin/magento crealoz:audit:run \ --language=en_US \ --ignored-modules=Vendor_Module1,Vendor_Module2Options:
- --language (-l): locale to use for messages (default: en_US)
- --ignored-modules (-i): comma-separated list of modules to exclude
-
Admin back-office: see docs/using-admin.md. Screenshots are available in docs/img.
Configuration and Environment Variables
Configuration can be set in Magento Admin at Stores > Configuration > Crealoz > Easy Audit.
Fields (etc/adminhtml/system.xml):
- Allow PR generation (easy_audit/general/pr_enabled)
- Hash (easy_audit/general/hash)
- Key (easy_audit/general/key)
- Credits left (display only)
Advanced settings (can also be set via app/etc/env.php using DeploymentConfig):
- easy_audit/middleware/host: override API host (default: https://api.crealoz.fr)
- easy_audit/middleware/self_signed: boolean; if true, SSL peer verification is disabled for the middleware client
- easy_audit/middleware/key: middleware key (overrides admin value)
- easy_audit/middleware/hash: middleware hash (overrides admin value)
Notes:
- PR generation uploads selected source data to a dedicated service for automated processing. See in-module notices for details.
- If you’re unsure of host/key/hash values, obtain them from your Crealoz account.
- TODO: Document sandbox/test endpoints if available.
Features at a Glance
- Detects common Magento anti-patterns (ObjectManager usage, helpers vs ViewModels, SQL in code, heavy classes without proxies, etc.)
- XML/layout checks (cacheable layout handles, preferences, plugins, command registrations)
- Logic-level insights (unused/disabled modules, Block vs ViewModel ratios)
- Database checks (heavy tables, flat catalog)
- PHPCS results export
- Result grids in Admin, downloadable reports, optional patch/ticket generation integration
For in-depth processors list and rationale, see docs/existing-processors.md.
Patch and Ticket Generation
From the result detail view, a Generate Patch button opens a modal where you can choose relative paths and patch type. Once generated, apply patches incrementally to avoid conflicts.
- Available processors include:
- Around plugins that should be converted to before/after plugins
- Proxies for commands
Ticket creation is available for GitHub and Jira; created links appear in the grid and disable the respective button.
Scripts
Utility scripts are provided in bash/ for development purposes:
- bash/add-headers-php: add a license header to all PHP files
- bash/add-headers-xml: add a license header to all XML files
- bash/add-headers-js: add a license header to all JS files
Composer scripts: none defined in this module’s composer.json.
Tests
PHPUnit configuration files are provided (phpunit.xml, phpunit.xml.dist). To run tests from the module root:
./vendor/bin/phpunit
Coverage reports (HTML and Clover) will be written under build/ as configured in phpunit.xml.
Notes:
- Unit tests live under Test/Unit; integration tests under Test/Integration.
- Integration tests may require a bootstrapped Magento testing environment and database configuration.
- TODO: Provide fixtures setup instructions for integration tests.
Project Structure (top-level)
- Api, Model, Service, Processor, Ui, Controller, etc: Magento module code
- etc/: DI, adminhtml, and other Magento configurations
- view/: adminhtml UI components and assets
- Test/: Unit, Integration, and Mocks
- docs/: documentation and screenshots
- bash/: development helpers
- composer.json, registration.php: module metadata and registration
- LICENSE, LICENSE-FR, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
License
EasyAudit Free is released under the MIT License. See LICENSE and LICENSE-FR for details.
Note: Certain referenced premium assets (e.g., examples or headers mentioning “EasyAudit Premium”) relate to a separate paid edition and are not part of this free module’s license. TODO: Add a link that compares Free vs Premium features.
Contributing
Contributions are welcome. Please open issues and submit pull requests. Be sure to run tests before submitting.
crealoz/easy-audit-free 适用场景与选型建议
crealoz/easy-audit-free 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 183 次下载、GitHub Stars 达 19, 最近一次更新时间为 2024 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「cli」 「module」 「extension」 「free」 「magento」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 crealoz/easy-audit-free 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crealoz/easy-audit-free 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 crealoz/easy-audit-free 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Slim starter / Slim skeleton package to boost your development with Slim framework
Yii2 module to manage website content. Kind of a CMS...
Generates a trait to help ease the access of custom repo methods
Alfabank REST API integration
Codeurx Modular is simply a package for Laravel to help you create and manage modules.
统计信息
- 总下载量: 183
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-07