Google Reviews DataForSEO
Fetch and display Google My Business reviews using DataForSEO API with configurable star ratings and company settings.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/joshyhud/google-review-scraper/archive/refs/heads/main.zipGoogle Reviews DataForSEO Plugin
A WordPress plugin that fetches and displays Google My Business reviews using the DataForSEO API with configurable settings and automated daily updates.
Features
- Fetch Google My Business reviews via DataForSEO API
- Automated daily review updates via WordPress cron
- Configurable minimum star rating filter
- Secure credential storage with encryption
- Task-based API system for reliable data retrieval
- Responsive review display with slider functionality
- Admin dashboard with status monitoring
- Rate limiting and comprehensive error handling
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- DataForSEO API account with valid credentials
- Valid Google My Business Place ID
Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through the WordPress admin panel
- Navigate to Settings > Google Reviews to configure
Configuration
Step 1: DataForSEO API Credentials
- Go to WordPress Admin > Settings > Google Reviews
- Enter your DataForSEO API credentials:
- Username (email address)
- Password
- Click "Save Credentials"
- Test the connection using "Test Connection" button
Step 2: Review Settings
Configure the following settings:
Google My Business Place ID
- Required: Your business's unique Google Place ID
- Find yours at: https://developers.google.com/maps/documentation/places/web-service/place-id
Location Name
- Optional but recommended
- Format: City,Region,Country
- Example: London,England,United Kingdom
Language
- Select the language for review retrieval
- Available: English, Spanish, French, German
Fetch Depth
- Number of reviews to retrieve (1-100)
- Default: 50
- Higher numbers may take longer to process
Minimum Star Rating
- Filter reviews by minimum rating (1-5 stars)
- Only reviews meeting this threshold will be displayed
Step 3: Save Settings
Click "Save Settings" to store your configuration.
Usage
Display Reviews on Your Website
Use the shortcode to display reviews anywhere on your site:
[google_reviews]
Shortcode Parameters
max - Maximum number of reviews to display
[google_reviews max="10"]
min_rating - Minimum star rating to show
[google_reviews min_rating="4"]
Combined example:
[google_reviews max="8" min_rating="5"]
Manual Review Management
Submit New Task
- Manually request fresh reviews from DataForSEO
- Creates a new task in the queue
Check Pending Tasks
- Manually check if submitted tasks have completed
- Retrieves and stores completed review data
Clear Cache
- Removes all stored review data
- Forces fresh data on next retrieval
How the DataForSEO Integration Works
Task-Based System
DataForSEO uses a two-step process:
- Task Submission: Your request is queued and assigned a unique ID
- Result Retrieval: Completed tasks are checked and results downloaded
Automated Schedule
- Daily Updates: New review tasks submitted at 2:00 AM
- Pending Task Checks: Automatic retrieval of completed tasks
- Error Handling: Failed tasks are logged and retried
Status Monitoring
The admin dashboard shows:
- API connection status
- Number of cached reviews
- Pending task count
- Last update timestamp
- Next scheduled update time
- Error messages (if any)
Troubleshooting
No Reviews Displaying
- Check API Credentials: Verify username/password are correct
- Validate Place ID: Ensure your Google Place ID is accurate
- Review Settings: Check minimum rating filter isn't too restrictive
- Pending Tasks: Use "Check Pending Tasks" to retrieve completed data
API Connection Issues
- Test Connection: Use the built-in connection test
- Check Logs: Enable WordPress debug logging to see detailed API responses
- Verify Account: Ensure your DataForSEO account is active and has sufficient credits
Missing Recent Reviews
- Submit New Task: Manually request fresh data
- Check Fetch Depth: Increase the number of reviews retrieved
- Wait for Processing: Tasks may take several minutes to complete
Debug Logging
Enable WordPress debug logging to troubleshoot issues:
Add to wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check /wp-content/debug.log for detailed API communication logs.
Security Features
- Encrypted Credential Storage: API credentials encrypted using WordPress salts
- Rate Limiting: Prevents excessive API requests
- Input Validation: All user inputs sanitized and validated
- SSRF Protection: API endpoints validated to prevent security issues
- Nonce Verification: All admin actions protected with security tokens
Support
For technical issues:
- Check the WordPress debug log for error messages
- Verify all configuration settings are correct
- Test API connectivity using the built-in tools
- Ensure your DataForSEO account has sufficient credits
Version History
- 1.0.0: Initial release with full DataForSEO integration
- Enhanced security and error handling
- Automated daily review updates
- Responsive review display system