Multi-Platform Content Syndication Hub
π Enterprise-grade WordPress plugin for automatic content syndication across multiple social media platforms. Built for rtCamp Associate Software Engineer application demonstrating advanced PHP, MySQL, JavaScript & WordPress development skills.
by Your Name Β· github.com/samarthkasar123/multi-platform-content-syndication-hub Β· website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/samarthkasar123/multi-platform-content-syndication-hub/archive/refs/heads/main.zipEnterprise-grade WordPress plugin for automatic content syndication across multiple social media platforms and publishing networks.
π― Enterprise WordPress Plugin
This plugin demonstrates advanced WordPress development skills with enterprise-grade architecture and modern development practices. Built to showcase expertise in complex plugin development, API integrations, and scalable WordPress solutions.
π Features
Core Functionality
- Automatic Content Syndication: Publish WordPress posts to multiple platforms simultaneously
- Queue System: Background processing for reliable content delivery
- Smart Content Formatting: Platform-specific content optimization
- Real-time Analytics: Track performance across all platforms
- Retry Mechanism: Automatic retry for failed publications
- Bulk Operations: Sync multiple posts at once
Supported Platforms
- Twitter/X - Tweet with media support
- Facebook - Posts with images and videos
- LinkedIn - Professional content sharing
- Instagram - Visual content with captions
- Medium - Long-form article publishing
- Dev.to - Developer-focused content
- Email Newsletter - Mailchimp integration
Advanced Features
- Content Formatting: Automatic adaptation for each platform's requirements
- Media Handling: Smart image and video processing
- Analytics Dashboard: Comprehensive performance tracking
- API Rate Limiting: Respectful platform API usage
- Error Handling: Robust error management and logging
- Mobile API: RESTful endpoints for external integrations
π Technical Requirements
- WordPress 5.0+
- PHP 8.0+
- MySQL 5.7+
- SSL Certificate (required for most APIs)
π Installation
-
Download the Plugin:
git clone https://github.com/your-username/multi-platform-syndication -
Upload to WordPress:
- Copy the plugin folder to
/wp-content/plugins/ - Or upload as a ZIP file through WordPress admin
- Copy the plugin folder to
-
Activate the Plugin:
- Go to Plugins > Installed Plugins
- Click "Activate" on Multi-Platform Content Syndication Hub
-
Configure API Keys:
- Navigate to Tools > Syndication Hub
- Configure each platform's API credentials
βοΈ Configuration
Platform Setup
Twitter/X Configuration
// Required credentials
- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret
Facebook Configuration
// Required credentials
- App ID
- App Secret
- Access Token
- Page ID (optional, for page posting)
LinkedIn Configuration
// Required credentials
- Client ID
- Client Secret
- Access Token
- Organization ID (optional)
Instagram Configuration
// Required credentials
- App ID
- App Secret
- Access Token
- Business Account ID
Medium Configuration
// Required credentials
- Access Token
- User ID
- Publication ID (optional)
Dev.to Configuration
// Required credentials
- API Key
- User ID (optional)
- Organization ID (optional)
Newsletter Configuration
// Required credentials
- Mailchimp API Key
- List ID
- Template ID (optional)
π― Usage
Basic Usage
- Write Your Post: Create a new WordPress post as usual
- Configure Syndication: In the post editor, check platforms for auto-sync
- Publish: When you publish the post, it automatically syndicates to selected platforms
Manual Syndication
// Sync a specific post to platforms
$result = MPCS_Hub_Platform_Manager::sync_content(
$post_id,
['twitter', 'facebook', 'linkedin']
);
Bulk Syndication
// Sync multiple posts
$results = MPCS_Hub_Platform_Manager::bulk_sync_content(
[123, 456, 789], // Post IDs
['medium', 'devto'] // Platforms
);
π Analytics
Viewing Analytics
- Dashboard Widget: Quick overview on WordPress dashboard
- Full Analytics Page: Tools > Syndication Hub > Analytics
- Post-specific Analytics: View analytics for individual posts
Available Metrics
- Engagement: Likes, shares, comments, reactions
- Reach: Views, impressions, click-through rates
- Performance: Success rates, error logs, processing times
π API Integration
REST API Endpoints
# Get platform status
GET /wp-json/mpcs-hub/v1/platforms
# Sync content
POST /wp-json/mpcs-hub/v1/sync
{
"post_id": 123,
"platforms": ["twitter", "facebook"]
}
# Get analytics
GET /wp-json/mpcs-hub/v1/analytics/123
Webhook Support
// Register webhook for platform updates
add_action('mpcs_hub_content_synced', function($post_id, $platform, $result) {
// Custom webhook logic
});
π§© Developer Hooks
Actions
// Before content sync
do_action('mpcs_hub_before_sync', $post_id, $platforms);
// After content sync
do_action('mpcs_hub_after_sync', $post_id, $results);
// On sync error
do_action('mpcs_hub_sync_error', $post_id, $platform, $error);
Filters
// Modify content before platform formatting
add_filter('mpcs_hub_content_data', function($content_data, $post_id) {
// Modify content data
return $content_data;
}, 10, 2);
// Add custom platforms
add_filter('mpcs_hub_platforms', function($platforms) {
$platforms['custom'] = [
'name' => 'Custom Platform',
'class' => 'My_Custom_Platform'
];
return $platforms;
});
π File Structure
multi-platform-syndication/
βββ multi-platform-syndication.php # Main plugin file
βββ includes/
β βββ class-database.php # Database operations
β βββ class-platform-manager.php # Core syndication logic
β βββ class-content-formatter.php # Content formatting
β βββ platforms/ # Platform handlers
β βββ class-twitter.php
β βββ class-facebook.php
β βββ class-linkedin.php
β βββ class-instagram.php
β βββ class-medium.php
β βββ class-devto.php
β βββ class-newsletter.php
βββ admin/
β βββ class-admin.php # WordPress admin integration
β βββ views/
β βββ dashboard.php # Main admin dashboard
β βββ platform-config.php # Platform configuration
β βββ analytics.php # Analytics page
βββ assets/
β βββ css/
β β βββ admin.css # Admin styling
β βββ js/
β βββ admin.js # Admin JavaScript
βββ README.md # Documentation
π§ Architecture
Database Schema
-- Sync logs table
CREATE TABLE wp_mpcs_sync_logs (
id int(11) AUTO_INCREMENT PRIMARY KEY,
post_id int(11) NOT NULL,
platform varchar(50) NOT NULL,
action varchar(20) NOT NULL,
status varchar(20) NOT NULL,
external_id varchar(255),
external_url text,
error_message text,
created_at datetime DEFAULT CURRENT_TIMESTAMP
);
-- Platform analytics table
CREATE TABLE wp_mpcs_platform_analytics (
id int(11) AUTO_INCREMENT PRIMARY KEY,
post_id int(11) NOT NULL,
platform varchar(50) NOT NULL,
external_id varchar(255),
metrics json,
last_updated datetime DEFAULT CURRENT_TIMESTAMP
);
-- Sync queue table
CREATE TABLE wp_mpcs_sync_queue (
id int(11) AUTO_INCREMENT PRIMARY KEY,
post_id int(11) NOT NULL,
platform varchar(50) NOT NULL,
action varchar(20) NOT NULL,
priority int(5) DEFAULT 10,
payload longtext,
attempts int(5) DEFAULT 0,
max_attempts int(5) DEFAULT 3,
scheduled_at datetime DEFAULT CURRENT_TIMESTAMP,
created_at datetime DEFAULT CURRENT_TIMESTAMP
);
Class Architecture
// Core Classes
- MPCS_Hub_Platform_Manager # Main orchestrator
- MPCS_Hub_Database # Database operations
- MPCS_Hub_Content_Formatter # Content adaptation
- MPCS_Hub_Admin # WordPress admin integration
// Platform Classes
- MPCS_Hub_Platform_Twitter
- MPCS_Hub_Platform_Facebook
- MPCS_Hub_Platform_Linkedin
- MPCS_Hub_Platform_Instagram
- MPCS_Hub_Platform_Medium
- MPCS_Hub_Platform_Devto
- MPCS_Hub_Platform_Newsletter
π§ͺ Testing
Manual Testing
- Create Test Post: Write a sample blog post
- Configure Platforms: Set up at least 2-3 platform credentials
- Test Syndication: Publish and verify content appears on platforms
- Check Analytics: Verify metrics are being collected
Automated Testing
# Run PHPUnit tests (if implemented)
./vendor/bin/phpunit tests/
# Check code quality
./vendor/bin/phpcs --standard=WordPress .
π¨ Troubleshooting
Common Issues
-
API Rate Limits:
- Solution: Enable queue system for delayed processing
- Check platform-specific rate limits
-
Authentication Errors:
- Verify API credentials are correct
- Check token expiration dates
- Ensure proper OAuth flows
-
Content Formatting Issues:
- Review character limits per platform
- Check media file formats and sizes
Debug Mode
// Enable debug logging
define('MPCS_HUB_DEBUG', true);
// View logs
tail -f /wp-content/debug.log | grep "MPCS_HUB"
π API Documentation
Platform API Requirements
| Platform | API Version | Auth Method | Rate Limit |
|---|---|---|---|
| v2.0 | OAuth 1.0a | 300/15min | |
| v18.0 | OAuth 2.0 | 4800/hour | |
| v2.0 | OAuth 2.0 | 1000/day | |
| v18.0 | OAuth 2.0 | 1000/hour | |
| Medium | v1.0 | Bearer Token | 1000/hour |
| Dev.to | v1.0 | API Key | 1000/hour |
| Mailchimp | v3.0 | API Key | 10/second |
π€ Contributing
This project welcomes contributions from the community. If you'd like to contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π License
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
π€ Author
Author
- GitHub: @SamarthKasar123
- Project: Multi-Platform Content Syndication Hub
π― Technical Showcase
This plugin demonstrates advanced WordPress development skills:
Technical Skills
- WordPress Development: Custom plugin architecture, hooks, filters
- PHP: Object-oriented programming, error handling, best practices
- MySQL: Database design, complex queries, performance optimization
- JavaScript: Modern ES6+, AJAX, admin interface interactions
- API Integration: Multiple platform APIs, OAuth, rate limiting
- CSS: Responsive design, WordPress admin styling
Architecture Skills
- Scalable Design: Modular architecture supporting multiple platforms
- Performance: Queue system, background processing, caching considerations
- Security: Input sanitization, nonce verification, capability checks
- Error Handling: Comprehensive error management and logging
- Documentation: Extensive documentation and code comments
WordPress Expertise
- Plugin Development: Complete plugin lifecycle, activation/deactivation
- Admin Interface: Custom admin pages, meta boxes, dashboard widgets
- Database: Custom tables, migration handling, data integrity
- REST API: Custom endpoints, authentication, data validation
- Best Practices: WordPress coding standards, security, performance
This project showcases enterprise-level WordPress development skills and demonstrates the ability to create complex, production-ready solutions for modern web applications.
Built with β€οΈ and modern WordPress development practices