=== Devs CRM ===
Contributors: devsbrain
Tags: crm, contacts, lead management, email campaigns, pipeline, customer management, sales pipeline, WooCommerce CRM
Requires at least: 5.8
Tested up to: 6.8
Stable tag: 2.0.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The lightweight WordPress CRM that keeps your customer data private. Manage contacts, track sales leads, and send email campaigns — no external services required.

== Description ==

**Take control of your customer relationships without leaving WordPress.**

Devs CRM is a privacy-focused, WordPress-native CRM plugin designed for freelancers, small businesses, and agencies who want to manage their contacts and sales pipeline without relying on expensive SaaS platforms.

> **Your data stays yours.** No external connections, no data harvesting, no monthly fees. Everything runs on your WordPress server.

### Why Choose Devs CRM?

* **100% Privacy-First** — Your customer data never leaves your WordPress site
* **Truly Free** — No "lite" version, no hidden paywalls, every feature included
* **Lightweight** — Built for performance, not bloat
* **WordPress-Native** — Feels like part of WordPress, not a bolted-on app
* **Integrates With Your Stack** — Works with WooCommerce, Gravity Forms, and Contact Form 7

### Who Is This For?

* **Freelancers** who need to track client projects and follow-ups
* **Small businesses** managing customer relationships on a budget
* **Agencies** handling multiple leads and proposals
* **E-commerce stores** wanting better customer insights from WooCommerce
* **Anyone** who values privacy and data ownership

### Core Features

#### Contact Management
* Add, edit, and organize unlimited contacts
* Tag contacts for easy filtering and segmentation
* Import and export contacts via CSV
* Quick search to find anyone instantly
* Bulk actions for efficient contact management

#### Visual Sales Pipeline
* Drag-and-drop Kanban board for your leads
* Track every deal from first contact to close
* Customize stages to match your sales process
* Default stages: New → Contacted → Qualified → Proposal → Won/Lost
* Add activity notes and timeline to any contact

#### Email Campaigns
* Create beautiful email campaigns in minutes
* Send bulk emails to targeted contact groups
* Filter recipients by tags for precise targeting
* Schedule campaigns for optimal timing
* Reusable email templates save you time
* Automated follow-up sequences for nurturing leads

#### Smart Integrations

* **WooCommerce** — Automatically capture customers as contacts when orders complete. See purchase history alongside contact details.

* **Gravity Forms** — Every form submission instantly becomes a contact. Perfect for lead capture forms and inquiries.

* **Contact Form 7** — Same seamless integration for CF7 users. No configuration needed — just activate and go.

#### Frontend Lead Capture
* Embed lead capture forms anywhere using the `[dcrm_lead_form]` shortcode
* Customize the form appearance with your theme
* Leads automatically enter your pipeline

### Built for WordPress

* Follows WordPress coding standards
* Compatible with popular page builders
* Translation-ready (i18n support)
* Works with multisite installations
* Regular updates and active development

== Installation ==

1. Log in to your WordPress admin dashboard.
2. Go to **Plugins > Add New**.
3. Click **Upload Plugin** and select the plugin zip file.
4. Click **Install Now**, then **Activate**.
5. Navigate to **Devs CRM** in the admin menu to get started.

**Quick Start:**
* Add your first contact from the Contacts menu
* Customize your pipeline stages under Settings
* Enable WooCommerce integration to auto-capture customers
* Use `[dcrm_lead_form]` shortcode to add a lead form to any page

== Frequently Asked Questions ==

= Is Devs CRM really free? =

Yes. All features are included in the free plugin. There is no pro version or upsell. We believe in open-source software that actually works.

= Does Devs CRM send emails? =

Yes. You can create email campaigns and send them to contacts filtered by tags. You can also schedule campaigns for later and set up automated follow-up email sequences.

= Can I import existing contacts? =

Yes. Devs CRM supports CSV import. Go to Contacts and click the Import button. You can map columns to contact fields during import.

= Does it work with WooCommerce? =

Yes. When enabled, Devs CRM automatically captures customers as contacts when their order is marked completed. You'll see order history alongside contact details.

= Can I customize the pipeline stages? =

Yes. Go to Settings > Pipeline Stages to add, edit, reorder, or delete stages. You can also assign colors to each stage for visual organization.

= Does it collect user data or phone home? =

No. Devs CRM does not connect to any external services. All data is stored locally in your WordPress database. Your customers' information never leaves your server.

= Can I use it with multiple users? =

Yes. Devs CRM respects WordPress user roles. Administrators and editors can manage all contacts. Other roles follow WordPress capabilities.

= Does it work with page builders? =

Yes. The lead capture form shortcode works with any page builder that supports shortcodes — Elementor, Beaver Builder, Divi, Gutenberg, and more.

== Screenshots ==

1. CRM Dashboard — overview of contacts, campaigns, and recent activity
2. Contacts — manage all your contacts with search, tags, and bulk actions
3. Pipeline Stages — configure your lead pipeline stages
4. Email Campaigns — create and manage email campaigns
5. Email Templates — build reusable email templates
6. Email Automation — set up follow-up email sequences
7. Integrations — connect WooCommerce, Gravity Forms, and Contact Form 7
8. Settings — manage tags and pipeline configuration
9. Frontend Lead Form — embeddable contact form via shortcode

== Other Notes ==

### Shortcodes

**Lead Capture Form**
`[dcrm_lead_form]`

Use this shortcode to embed a lead capture form on any page or post. Works with all standard themes and page builders.

### System Requirements

* WordPress 5.8 or higher
* PHP 7.4 or higher
* MySQL 5.7+ or MariaDB 10.3+

### Support

For support, feature requests, or bug reports, please visit our GitHub repository or WordPress.org support forum.

### Translations

Devs CRM is translation-ready. If you'd like to contribute a translation, please contact us.

### Contributing

Devs CRM is open source. Contributions are welcome via pull requests on GitHub.

== Changelog ==

= 2.0.2 =

**Security & Performance Update**

**Security Fixes:**
* Added HMAC token validation for unsubscribe endpoint — prevents abuse
* Sanitized tags in bulk update operations — prevents stored XSS
* Added file validation for CSV imports — checks type and size
* Added rate limiting for email open tracking — prevents analytics corruption
* Sanitized integration field mappings before storing in database
* Added integer validation for bulk delete operations
* Added $wpdb->esc_like() for search queries — prevents wildcard matching

**Performance Fixes:**
* Added database indexes on email, deleted_at, stage_id, status columns — faster queries
* Fixed N+1 query in email sending — batch-loads lead data instead of per-recipient queries
* Fixed N+1 query in campaign create/update — batch-loads contact IDs
* Added conditional class loading — only loads routes when needed
* Optimized migration checks — only runs migration files when update is needed
* Added version parameters to all CSS files — prevents stale cache

**Other Improvements:**
* Fixed uninstall.php to clean up all plugin options
* Fixed plugin deactivation to clear all cron hooks
* Added missing database tables to uninstall cleanup
* Improved error messages for better user experience

= 2.0.0 =

**Major Update: Complete CRM Rewrite**

This is a significant release that transforms Devs CRM into a focused, powerful customer relationship management tool.

**New Features:**
* Visual sales pipeline with drag-and-drop Kanban board
* Activity notes and timeline for tracking contact interactions
* WooCommerce integration for automatic customer capture
* Gravity Forms integration for lead capture
* Contact Form 7 integration for lead capture
* Configurable pipeline stages with custom colors
* Integrations settings page for easy setup

**Email Campaign Improvements:**
* Campaigns now reliably save all changes (subject, body, recipients, scheduling)
* Email scheduling works correctly — campaigns send at your chosen time
* Template selection now persists when editing campaigns
* Contact filtering improvements for targeted campaigns

**Contact Management:**
* Enhanced import/export functionality
* Improved search and filtering
* Better tag management

**Security & Performance:**
* Fixed security vulnerabilities in API endpoints
* Removed unused database tables from previous versions
* Optimized database queries for better performance
* Cleaned up debug logging and unused code

**Compatibility:**
* Tested up to WordPress 6.8
* PHP 7.4 minimum requirement
* Improved compatibility with caching plugins

= 1.1.9 =

* Security improvements
* Task management bug fixes

= 1.1.8 =

* Redesigned user interface for better usability
* Added email campaign scheduling and sending
* Introduced email automation for follow-up sequences
* Performance improvements and bug fixes

= 1.1.7 =

* Added email campaign feature with scheduling
* Introduced CSV import/export for contacts and leads
* Added shortcode support for member forms
* Bulk operation features for contact management
* UI improvements and performance optimizations

= 1.1.6 =

* Updated design for better user experience
* Added WordPress admin menu icon
* Contact management bug fixes

= 1.1.5 =

* Redesigned contacts and leads tables
* Added contact tagging system
* Dynamic tag creation from settings
* Contact bug fixes

= 1.1.4 =

* Added leads management table
* Page display bug fixes

= 1.1.3 =

* Fixed member access permissions
* Time tracking bug fixes
* Attendance calendar improvements

= 1.1.2 =

* Enhanced dashboard with additional metrics
* Time tracking fixes
* Employee management bug fixes

= 1.1.1 =

* Added employee attendance tracking
* Dashboard updates with attendance overview
* Time tracking feature

= 1.1.0 =

* Added attendance calendar
* Dashboard improvements
* Task details bug fixes

= 1.0.9 =

* Style improvements
* Member management bug fixes

= 1.0.8 =

* Initial release

== Upgrade Notice ==

= 2.0.0 =
Major update. Plugin is now a focused CRM with visual pipeline, email campaigns, and integrations. Non-CRM features have been removed. Your existing contacts and data are preserved.
