Skip to content

Commit 1570dcb

Browse files
committed
Initial release: WebDecoy Bot Detection v2.0.0
Zero-config WordPress bot detection plugin. Protects against bots, spam, and carding attacks with SHA-256 proof-of-work challenges, behavioral scoring, rate limiting, and WooCommerce checkout protection. Works immediately on activation with no external dependencies. Optional WebDecoy Cloud integration for threat intelligence.
0 parents  commit 1570dcb

45 files changed

Lines changed: 15648 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Exclude from release archives (git archive / GitHub ZIP downloads)
5+
/.github export-ignore
6+
/assets export-ignore
7+
/.gitattributes export-ignore
8+
/.gitignore export-ignore
9+
/phpcs.xml.dist export-ignore
10+
/phpstan.neon export-ignore
11+
/composer.json export-ignore
12+
/composer.lock export-ignore
13+
/CONTRIBUTING.md export-ignore
14+
/README.md export-ignore

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
phpcs:
11+
name: PHP Coding Standards
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.1'
20+
tools: composer, cs2pr
21+
22+
- name: Install dependencies
23+
run: composer install --no-progress --prefer-dist
24+
25+
- name: Run PHPCS
26+
run: vendor/bin/phpcs
27+
28+
phpstan:
29+
name: Static Analysis
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: '8.1'
38+
tools: composer
39+
40+
- name: Install dependencies
41+
run: composer install --no-progress --prefer-dist
42+
43+
- name: Run PHPStan
44+
run: vendor/bin/phpstan analyse
45+
46+
php-compat:
47+
name: PHP 7.4 Compatibility
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Setup PHP
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: '8.1'
56+
tools: composer
57+
58+
- name: Install dependencies
59+
run: composer install --no-progress --prefer-dist
60+
61+
- name: Check PHP 7.4 compatibility
62+
run: vendor/bin/phpcs --standard=PHPCompatibilityWP --runtime-set testVersion 7.4- .

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Dependencies
2+
/vendor/
3+
/sdk/vendor/
4+
/node_modules/
5+
6+
# Build artifacts
7+
/build/
8+
/dist/
9+
10+
# IDE
11+
.idea/
12+
.vscode/
13+
*.code-workspace
14+
15+
# OS files
16+
.DS_Store
17+
Thumbs.db
18+
19+
# Composer
20+
composer.lock
21+
22+
# PHP tools cache
23+
.phpcs-cache
24+
.phpunit.result.cache
25+
26+
# Environment
27+
.env
28+
.env.*
29+
30+
# Logs
31+
*.log

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to WebDecoy
2+
3+
Thank you for your interest in contributing to WebDecoy! This guide covers setup, coding standards, and the pull request process.
4+
5+
## Development Environment
6+
7+
1. A local WordPress installation (5.6+) with PHP 7.4 or higher.
8+
2. [WooCommerce](https://woocommerce.com/) installed if working on payment protection features.
9+
3. Clone or symlink this plugin into `wp-content/plugins/webdecoy/`.
10+
4. Install dev dependencies:
11+
12+
```bash
13+
composer install
14+
```
15+
16+
## Code Style
17+
18+
This project follows the [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/). All PHP files are checked automatically by PHPCS.
19+
20+
Run the linter:
21+
22+
```bash
23+
vendor/bin/phpcs
24+
```
25+
26+
Auto-fix what can be fixed:
27+
28+
```bash
29+
vendor/bin/phpcbf
30+
```
31+
32+
## Static Analysis
33+
34+
PHPStan is configured at level 5. Run it with:
35+
36+
```bash
37+
vendor/bin/phpstan analyse
38+
```
39+
40+
## PHP Compatibility
41+
42+
The plugin supports PHP 7.4 and above. Check compatibility with:
43+
44+
```bash
45+
vendor/bin/phpcs --standard=PHPCompatibilityWP --runtime-set testVersion 7.4- .
46+
```
47+
48+
## Submitting a Pull Request
49+
50+
1. Fork the repository and create a feature branch from `main`.
51+
2. Make your changes, keeping commits focused and well-described.
52+
3. Ensure all checks pass: PHPCS, PHPStan, and PHP compatibility.
53+
4. Open a pull request against `main` with a clear description of the change.
54+
55+
## Testing Checklist
56+
57+
Before submitting, manually verify:
58+
59+
- [ ] Plugin activates and deactivates without errors.
60+
- [ ] Settings page loads and saves correctly.
61+
- [ ] Detections page displays data properly.
62+
- [ ] Dashboard widget renders without errors.
63+
- [ ] No PHP notices, warnings, or errors in the debug log.
64+
- [ ] If WooCommerce-related: checkout and order flow work normally.
65+
66+
## Reporting Issues
67+
68+
Open an issue with:
69+
70+
- WordPress and PHP versions.
71+
- Steps to reproduce.
72+
- Expected vs. actual behavior.
73+
- Any relevant error log output.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# WebDecoy Bot Detection
2+
3+
[![WordPress Version](https://img.shields.io/badge/WordPress-5.6%2B-blue.svg)](https://wordpress.org/)
4+
[![PHP Version](https://img.shields.io/badge/PHP-7.4%2B-8892BF.svg)](https://php.net/)
5+
[![License](https://img.shields.io/badge/License-GPLv2%2B-green.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
6+
[![CI](https://github.com/user/webdecoy-wordpress/actions/workflows/ci.yml/badge.svg)](https://github.com/user/webdecoy-wordpress/actions)
7+
8+
Zero-configuration bot protection for WordPress. Works immediately on activation with no account, no API key, and no external dependencies. Multi-layer detection uses invisible proof-of-work challenges so legitimate visitors are never interrupted.
9+
10+
## Features
11+
12+
- **Zero friction** -- Humans never see CAPTCHAs or challenges
13+
- **Zero configuration** -- Install, activate, done
14+
- **Multi-layer detection** -- Server-side analysis, client-side fingerprinting, and proof-of-work challenges
15+
- **Good bot verification** -- Reverse DNS verification for Googlebot, Bingbot, and other legitimate crawlers
16+
- **MITRE ATT&CK path analysis** -- Detects admin probing and config file access attempts
17+
- **Rate limiting** -- Automatic blocking with configurable thresholds
18+
- **IP blocking** -- Individual and CIDR ranges, IPv4/IPv6, with optional expiration
19+
- **WooCommerce integration** -- Checkout protection against carding attacks
20+
- **Dashboard & statistics** -- Detection trends, threat breakdown, and recent activity
21+
22+
## Installation
23+
24+
### From WordPress.org
25+
26+
1. Go to **Plugins > Add New** in your WordPress admin
27+
2. Search for "WebDecoy Bot Detection"
28+
3. Click **Install Now**, then **Activate**
29+
30+
### Manual Installation
31+
32+
1. Download the latest release ZIP from the [Releases](https://github.com/user/webdecoy-wordpress/releases) page
33+
2. Go to **Plugins > Add New > Upload Plugin**
34+
3. Upload the ZIP file and click **Install Now**
35+
4. Activate the plugin
36+
37+
## Development
38+
39+
### Prerequisites
40+
41+
- PHP 7.4+
42+
- [Composer](https://getcomposer.org/)
43+
44+
### Setup
45+
46+
```bash
47+
composer install
48+
```
49+
50+
### Coding Standards
51+
52+
```bash
53+
composer run phpcs
54+
```
55+
56+
### Static Analysis
57+
58+
```bash
59+
composer run phpstan
60+
```
61+
62+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.
63+
64+
## License
65+
66+
This project is licensed under the GPL v2 or later. See [license.txt](license.txt) for details.

0 commit comments

Comments
 (0)