WPDating Explicit Content Filter – Complete Setup Guide

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

  1. Automatic image content moderation
  2. Multiple detection providers (Local & Cloud-based)
  3. Real-time content scanning
  4. Customizable sensitivity levels
  5. Detailed moderation logs
  6. Admin notification system

Server Requirements

  1. Minimum Requirements

  • WordPress: 5.0 or higher
  • PHP: 8.0 or higher
  • Memory: 256MB minimum (512MB recommended)
  • Storage: 100MB free space
  1. 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

  1. Upload the plugin folder to `/wp-content/plugins/`
  2. Activate the plugin through WordPress Admin → Plugins
  3. 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

Best for: Privacy-conscious users, no ongoing costs

Prerequisites

  1. Node.js is installed on your server
  2. 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 need build-essential/gcc and make for native modules (sudo apt-get install -y build-essential on 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

  1. Go to WPDating → Content Checker
  2. Select NSFW.js (Local) as Active Provider
  3. Set threshold between 0.5-0.8 (recommended: 0.7)
  4. Enable content checking

Option 2: OpenAI Moderation API(Best for: High accuracy, easy setup)

Setup Steps

  1. Create an OpenAI Account

  1. Generate API Key

  1. Add Credits to Account

  1. 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

  1. Create a Sightengine Account

  1. Get API Credentials

  1. Choose Plan

    • Free: 1,000 checks/month
    • Starter: $5/month for 5,000 checks
    • Pro: $25/month for 25,000 checks
  1. 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

  1. Create a Google Cloud Account

  1. Create New Project

    • Click “Select a project” → “New Project”
    • Name: “WPDating Content Filter”
    • Click “Create”
  1. Enable Vision API

  1. Create API Key

  1. Set Billing

  1. 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

  1. Enable Content Checking

    • Check this box to activate the plugin
  1. Active Provider

    • Choose your preferred detection method

  1. 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
  1. Content Types to Check

    • ✅ Porn: Explicit sexual content
    • ✅ Sexy: Suggestive content
    • ❌ Hentai: Animated explicit content
    • ❌ Drawing: Illustrated content
    • ❌ Neutral: Safe content
    • Logging Settings
  1. Log Results

    • Enable tracking of all detection results
    • Logs stored in: `/wp-content/uploads/explicit-check-temp/`

Testing

Test Your Setup

  1. Go to Content Checker Settings
  2. Scroll to the “Test Image Check” section
  3. Upload a test image
  4. Click “Test Image”
  5. Review results

Test Images

  • Safe image: The classifier should return “Safe.”
  • Explicit image: The classifier should return “Explicit” along with a confidence score.

Output Schema (example)

{
"is_explicit": false,
"confidence": 0.15,
"type": "neutral",
"all_predictions": [...]
}
 

Troubleshooting

  1. “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

  2. “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

  3. “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

  4. “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

  5. “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

  1. Use Cloud APIs instead of local processing
  2. Implement caching for repeated images
  3. Set appropriate thresholds to reduce false positives
  4. Monitor API usage and costs

For Privacy-Conscious Sites

  1. Use NSFW.js for local processing
  2. Disable logging if not needed
  3. 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

  1. Check Logs: Review error logs in WordPress admin
  2. Test Configuration: Use the built-in test feature
  3. Contact Support:
  4. Email: support@wpdating.com
  5. 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.