compliance - Module Compliance CheckVerify PrestaShop module compliance with official standards using the PrestaShop Compliance API.
The compliance command validates PrestaShop modules against official PrestaShop coding standards, marketplace requirements, and best practices to ensure quality and compatibility.
Before running the compliance command:
ps-enterprise start)# Shows list of available modules to check
ps-enterprise compliance
# Check specific module by exact name
ps-enterprise compliance mymodule
# Check module with partial name matching
ps-enterprise compliance payment
| Flag | Short | Description | Required |
|---|---|---|---|
--help |
-h |
Show command help | No |
The compliance tool automatically detects modules from your local environment:
/modules/ directory for installed modules# Exact module name matching
ps-enterprise compliance paymentmodule
# Partial name matching (shows options if multiple matches)
ps-enterprise compliance payment
# Output:
# Multiple modules found matching 'payment':
# 1. paymentmodule
# 2. payment_gateway
# 3. advanced_payment
# ? Select module to check: [1-3]
# Shows all available modules
ps-enterprise compliance
# Output:
# Available modules for compliance check:
# 1. customtheme
# 2. paymentmodule
# 3. shippingmodule
# 4. analyticsmodule
# ? Select module(s) to check: [1-4, comma-separated]
# Check specific payment module
ps-enterprise compliance paymentmodule
# Output:
# ✓ Analyzing module: paymentmodule v1.2.3
# ✓ Code structure validation
# ✓ Security analysis
# ✓ Performance analysis
# ✓ Marketplace requirements check
#
# Compliance Report:
# ==================
# Overall Score: 85/100
#
# Issues Found:
# ERROR (2):
# - Line 45: SQL injection vulnerability in getOrders()
# - Line 67: Missing input validation for user data
#
# WARNING (3):
# - Line 23: Deprecated PrestaShop function usage
# - Line 89: Missing translation for admin interface
# - Line 112: Inefficient database query detected
#
# Recommendations:
# - Use PrestaShop's Db::getInstance()->execute() for safe queries
# - Add Tools::getValue() validation for user inputs
# - Update to use current PrestaShop API functions
# Interactive selection from available modules
ps-enterprise compliance
# Shows module selection menu:
# Available modules:
# 1. customtheme (v2.1.0)
# 2. paymentmodule (v1.3.2)
# 3. shippingmodule (v1.0.1)
# 4. analyticsmodule (v2.0.0)
# 5. All modules
# ? Select modules to check (comma-separated): 2,3
# During development
ps-enterprise compliance mymodule
# Fix issues found
# Edit module files...
# Re-check compliance
ps-enterprise compliance mymodule
# Repeat until satisfactory score achieved
# Before marketplace submission
ps-enterprise compliance mymodule
# Ensure score is 85+ and no CRITICAL/ERROR issues
# Address all security-related warnings
# Verify all marketplace requirements are met
#!/bin/bash
# quality-check.sh - Automated compliance checking
for module in $(ls modules/); do
echo "Checking $module..."
ps-enterprise compliance $module
done
# Check all custom modules (non-core modules)
find modules/ -maxdepth 1 -type d -not -name "ps_*" | while read module; do
ps-enterprise compliance $(basename $module)
done
While the CLI provides console output, you can redirect output for processing:
# Save compliance report to file
ps-enterprise compliance mymodule > compliance-report.txt
# Process multiple modules and save reports
for module in payment shipping analytics; do
ps-enterprise compliance $module > "compliance-${module}.txt"
done
❌ Module 'nonexistent' not found in modules directory
Available modules: paymentmodule, shippingmodule, analytics
Solution: Verify module name and installation.
❌ Cannot connect to PrestaShop Compliance API
Please check your internet connection and try again.
Solution: Verify internet connectivity and retry.
❌ Invalid module structure: Missing required file 'mymodule.php'
Solution: Fix module structure to include all required files.
start - Required to have running environment for module analysisexec - Can be used to access module files for fixing issues