Plugin Overview
The WPDating Explicit Content Filter automatically detects and prevents the upload of explicit or inappropriate images using machine learning. It supports multiple detection providers for maximum flexibility and privacy.
Key Features
- Automatic image content moderation
- Multiple detection providers (Local & Cloud-based)
- Real-time content scanning
- Customizable sensitivity levels
- Detailed moderation logs
- Admin notification system
Server Requirements
-
Minimum Requirements
- WordPress: 5.0 or higher
- PHP: 8.0 or higher
- Memory: 256MB minimum (512MB recommended)
- Storage: 100MB free space
-
For Local NSFW.js Processing
- Node.js: Version 14.0 or higher
- Memory: 1GB RAM minimum (2GB recommended)
- Storage: 200MB free space (for model files)
- For Cloud API Providers
- cURL extension: Enabled
- SSL certificates: Valid HTTPS
- Internet connection: Stable for API calls
Installation Steps
Step 1: Plugin Installation
- Upload the plugin folder to `/wp-content/plugins/`
- Activate the plugin through WordPress Admin → Plugins
- Navigate to WPDating → Content Checker in your admin menu
Step 2: Choose Your Detection Provider
The plugin offers four detection methods:
|
Provider |
Type |
Privacy |
Cost |
Setup Complexity |
|---|---|---|---|---|
|
NSFW.js |
Local |
High |
Free |
Medium |
|
OpenAI |
Cloud |
Medium |
Paid |
Easy |
|
Sightengine |
Cloud |
Medium |
Paid |
Easy |
|
Google Vision |
Cloud |
Medium |
Paid |
Easy |
Provider Setup Guides
Option 1: NSFW.js (Local Processing) – RECOMMENDED
Best for: Privacy-conscious users, no ongoing costs
Prerequisites
- Node.js is installed on your server
- Command line access to your server
Setup Steps
1) Install Node.js on your server
Install Node.js 18.x using the official NodeSource setup scripts.
# For Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# For CentOS/RHEL
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo yum install -y nodejs
Note: You may needbuild-essential/gccandmakefor native modules (sudo apt-get install -y build-essentialon Debian/Ubuntu).
2) Install required packages
From the plugin’s library directory, install npm dependencies.
cd /var/www/wordpress/wp-content/plugins/addons-plugins/wpdating-explicit-content-filter/lib/
npm install
3) Set proper permissions
Ensure the script is executable.
chmod +x /var/www/wordpress/wp-content/plugins/addons-plugins/wpdating-explicit-content-filter/lib/nsfw-check.js
4) Test the installation
Verify the script runs and prints its version.
node nsfw-check.js --version
If the command returns a version string without errors, the setup is complete.
Configuration
- Go to WPDating → Content Checker
- Select NSFW.js (Local) as Active Provider
- Set threshold between 0.5-0.8 (recommended: 0.7)
- Enable content checking
Option 2: OpenAI Moderation API(Best for: High accuracy, easy setup)
Setup Steps
-
Create an OpenAI Account
-
- Visit [OpenAI Platform](https://platform.openai.com/)
- Sign up or log in to your account
-
Generate API Key
-
- Go to [API Keys](https://platform.openai.com/api-keys)
- Click “Create new secret key”
- Copy the key (starts with `sk-`)
-
Add Credits to Account
-
- Go to [Billing](https://platform.openai.com/account/billing)
- Add payment method and credits
- Cost: ~$0.01-0.05 per image
-
Configure Plugin
-
- Go to WPDating → Content Checker
- Select OpenAI Moderation as Active Provider
- Paste your API key in the OpenAI API Key field
- Set threshold (recommended: 0.7)
- Save settings
#### API Key Format
sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Option 3: Sightengine API(Best for: Professional content moderation, detailed results)
Setup Steps
-
Create a Sightengine Account
-
- Visit [Sightengine](https://sightengine.com/)
- Sign up for a free account
-
Get API Credentials
-
- Go to your [Dashboard](https://sightengine.com/dashboard)
- Find your API User and API Secret
- Format: `user: secret`
-
Choose Plan
-
- Free: 1,000 checks/month
- Starter: $5/month for 5,000 checks
- Pro: $25/month for 25,000 checks
-
Configure Plugin
-
- Go to WPDating → Content Checker
- Select Sightengine as Active Provider
- Enter API credentials in the format: `your_user:your_secret`
- Set threshold (recommended: 0.6)
- Save settings
#### API Credentials Format
123456789:abcdefghijklmnopqrstuvwxyz123456
Option 4: Google Cloud Vision API(Best for: Google ecosystem integration, enterprise use)
Setup Steps
-
Create a Google Cloud Account
-
- Visit [Google Cloud Console](https://console.cloud.google.com/)
- Sign up or log in
-
Create New Project
-
- Click “Select a project” → “New Project”
- Name: “WPDating Content Filter”
- Click “Create”
-
Enable Vision API
-
- Go to [APIs & Services](https://console.cloud.google.com/apis/library)
- Search for “Cloud Vision API”
- Click “Enable”
-
Create API Key
-
- Go to [Credentials](https://console.cloud.google.com/apis/credentials)
- Click “Create Credentials” → “API Key”
- Copy the API key
-
Set Billing
-
- Go to [Billing](https://console.cloud.google.com/billing)
- Link a payment method
- Cost: ~$1.50 per 1,000 images
-
Configure Plugin
-
- Go to WPDating → Content Checker
- Select Google Cloud Vision as Active Provider
- Paste your API key
- Set threshold (recommended: 0.6)
- Save settings
API Key Format
AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Configuration
General Settings
-
Enable Content Checking
-
- Check this box to activate the plugin
-
Active Provider
-
-
Choose your preferred detection method
-
-
Threshold Setting
-
- 0.0-0.3: Very strict (may flag safe content)
- 0.4-0.6: Balanced (recommended)
- 0.7-0.9: Lenient (may miss explicit content)
- 1.0: Most lenient
-
Content Types to Check
-
- ✅ Porn: Explicit sexual content
- ✅ Sexy: Suggestive content
- ❌ Hentai: Animated explicit content
- ❌ Drawing: Illustrated content
- ❌ Neutral: Safe content
- Logging Settings
-
Log Results
-
- Enable tracking of all detection results
- Logs stored in: `/wp-content/uploads/explicit-check-temp/`
Testing
Test Your Setup
- Go to Content Checker Settings
- Scroll to the “Test Image Check” section
- Upload a test image
- Click “Test Image”
- Review results
Troubleshooting
Common Issues
-
“Node.js not found” Error
Solution:
Check if Node.js is installed by running: node –version
If it is not installed, install Node.js using:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash –
sudo apt-get install -y nodejs -
“Permission denied” Error
Solution:
Fix file permissions by running: chmod +x /path/to/nsfw-check.js
Adjust directory permissions using: chmod 755 /path/to/temp/directory -
“API key invalid” Error
Solutions:
Verify the API key is correct
Check whether the API key has the required permissions
Make sure billing is set up if the API requires it
Check if you have exceeded any API usage limits -
“Model download failed” Error
Solution:
Clear the npm cache and reinstall dependencies by navigating to the plugin’s library folder and running the following steps:
Go to the plugin lib directory
Delete the node_modules folder and the package-lock.json file
Reinstall dependencies using npm install -
“Memory limit exceeded” Error
Solution:
Increase the PHP memory limit by adding the following in wp-config.php:
ini_set(‘memory_limit’, ‘512M’);
Debug Mode
Enable WordPress debug mode to see detailed error messages by adding these lines to wp-config.php:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
Performance Optimization
For High-Traffic Sites
- Use Cloud APIs instead of local processing
- Implement caching for repeated images
- Set appropriate thresholds to reduce false positives
- Monitor API usage and costs
For Privacy-Conscious Sites
- Use NSFW.js for local processing
- Disable logging if not needed
- Regular cleanup of temp files
Security Considerations
API Key Security
- Store API keys securely
- Use environment variables if possible
- Regularly rotate API keys
- Monitor API usage for anomalies
File Upload Security
- Validate file types before processing
- Set appropriate file size limits
- Implement rate limiting for uploads
Support
Getting Help
- Check Logs: Review error logs in WordPress admin
- Test Configuration: Use the built-in test feature
- Contact Support:
- Email: support@wpdating.com
- Forum: https://wpdating.com/support/
Useful Commands
Check the Node.js version:
node –version
Check installed npm packages by navigating to the plugin library directory and running:
cd /path/to/plugin/lib/ && npm list
Test NSFW.js directly with an image and output file path:
node nsfw-check.js /path/to/image.jpg /path/to/output.json
Check the PHP memory limit:
php -i | grep memory_limit
Check whether the cURL extension is enabled:
php -m | grep curl
Cost Estimates(Monthly Costs (1000 images))
|
Provider |
Free Tier |
Paid Plans |
|---|---|---|
|
NSFW.js |
FREE |
FREE |
|
OpenAI |
$5 credit |
$10-50 |
|
Sightengine |
1,000 free |
$5-25 |
|
Google Vision |
$300 credit |
$1.50 |
Conclusion
This plugin provides comprehensive content moderation for your WPDating website. Choose the provider that best fits your needs:
- Privacy + No Cost: NSFW.js
- Easy Setup + Accuracy: OpenAI
- Professional Features: Sightengine
- Google Integration: Google Vision
For support, please feel free to contact the WPDating Support Team.
