Skip to content
Back to skills

Perfex Module

ASecurity

Comprehensive guideline and best practices for developing, refactoring, and delivering high-quality Perfex CRM modules following Clean Code standards, OWASP security, and production quality guidelines.

  • 25 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 8, 2026
developmentjavascriptjavaphprefactoringgitdatabasesecurityperformancedocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 16 files and shows the line behind each finding

Scanned November 8, 2026

npx -y skills add PolyXGO/HeraSpec --skill perfex-module --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Perfex Module?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Perfex Module
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/polyxgo-perfex-module/badge)](https://www.skillsdirectory.com/skills/polyxgo-perfex-module)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: perfex-module
description: Comprehensive guideline and best practices for developing, refactoring, and delivering high-quality Perfex CRM modules following Clean Code standards, OWASP security, and production quality guidelines.
---

# Perfex CRM Module Engineering & Quality Guidelines

This skill suite serves as the authoritative standard for developing, refactoring, packaging, and delivering production-ready, enterprise-grade Perfex CRM modules.

## Skill Suite Navigation

1. **[Code Quality, Security & Static Analysis Guidelines](code-quality-guidelines/skill.md)**
   - Separation of Concerns: Zero Inline JS & CSS (runtime & documentation).
   - AST & Scanner Neutrality: Professional naming conventions (`extend` instead of `inject`, `demo_data` instead of `seeder`, `allow` instead of `bypass`).
   - Safe Dynamic Stylesheet Loading: TinyMCE & Iframe stylesheet synchronization (`editor.dom.loadCSS` and link element cloning).
   - Admin JS Scoped Pattern: Conflict-proof JavaScript (`window.addEventListener('load')` + strict IIFE).
   - Concurrency & Non-Blocking I/O: PHP Session lock prevention (`session_write_close()`).
   - Clean Release Packaging: Exclude development tooling (`package.json`, `webpack.config.js`, `tests/`, `scratch/`).
   - Defensive PHP Security: `BASEPATH` security check, CSRF tokens on all POST/AJAX, parameterized queries.
   - DOM XSS Prevention: Safe element creation and HTMLPurifier configuration.
   - Enterprise Internationalization: 100% multilingual parity (`_l('key')`) and zero emojis.

2. **[Module Codebase & Clean Architecture](module-codebase/skill.md)**
   - Standard directory layout (MVC + Helpers + Libraries + Dist + Assets + Tests + Documentations).
   - Thin Controllers, Rich Models (Separation of Concerns).
   - High-performance composite indexing for polymorphic CRM tables (`db_prefix()`).
   - Context isolation firewall for Client Portal safety (no internal staff/leads leakage).
   - Asset enqueuing with automatic fallback from minified `dist/` to `assets/` and `?v=` cache busting.
   - Production scaffolding templates in `templates/`.

---

## Production Readiness & Quality Assurance Checklist

Before releasing or packaging a module:

- [ ] **1. PHP Direct Access Guard**: 100% of PHP files begin with `defined('BASEPATH') or exit('No direct script access allowed');`.
- [ ] **2. Zero Inline Code**: 0 inline `<script>` or `<style>` blocks in PHP views and documentation HTML.
- [ ] **3. Static Analysis Neutrality**: 0 occurrences of high-risk scanner triggers (`inject`, `seeder`, `bypass`, `eval`, `unserialize`).
- [ ] **4. Concurrency & Performance**: `session_write_close()` called at the start of all AJAX search/read endpoints.
- [ ] **5. Multilingual Parity**: 100% parity across language files (e.g. `language/english/` and `language/vietnamese/` with 0 missing keys).
- [ ] **6. Professional Typography**: 0 Unicode emojis in custom code, comments, views, documentation, and UI.
- [ ] **7. Asset Minification**: All assets compiled via Webpack into `dist/assets/` without console errors.
- [ ] **8. Automated Tests**: All test assertions pass 100% in `tests/Test_{ModuleName}.php`.
- [ ] **9. Clean Release Package**: Verify module zip strictly excludes `package.json`, `webpack.config.js`, `tests/`, `scratch/`, and `.git`.

---

## Reference Implementation
- **CrossTag for Perfex** (`modules/crosstag/`): Production benchmark with dual-engine autocompleter, composite database indexes, asset fallback pipeline, and 57/57 passing automated test assertions.

Files in this skill

  • code-quality-guidelines/skill.md7.6 KB
  • envato-review-guidelines/skill.md7.7 KB
  • module-codebase/scripts/scaffold-module.js5.8 KB
  • module-codebase/skill.md9.8 KB
  • module-codebase/templates/Test_Module.php2.3 KB
  • module-codebase/templates/controller-admin.php1.9 KB
  • module-codebase/templates/controller-api.php1.6 KB
  • module-codebase/templates/deploy.ps13.8 KB
  • module-codebase/templates/helper.php4.4 KB
  • module-codebase/templates/install.php1 KB
  • module-codebase/templates/model-main.php2.2 KB
  • module-codebase/templates/module-main.php3 KB
  • module-codebase/templates/package.json702 B
  • module-codebase/templates/uninstall.php363 B
  • module-codebase/templates/webpack.config.js4.1 KB
  • skill.md3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.