Releases: souldret/chapter-uploader
Release list
V1.8.0
[1.8.0] - 2026-08-05 - Security Hardening & Performance Release
This release consolidates all fixes from v1.7.2 and adds final security/performance hardening identified during a full code review pass.
Security
- FIXED (Critical):
MCU_AdvancedFetcher::fetch_from_mangadex()was called asfetch_from_mangadexbut defined asfetch_from_mangadx— caused a PHP fatal error when fetching from mangadex.org. - FIXED: Added missing
current_user_can('upload_files')permission checks tohandle_test_blogger_url,handle_auto_increment_chapter, andhandle_finalize_uploadAJAX handlers. - FIXED: Added SSRF protection to URL fetch handlers — only
http/httpsschemes allowed, blocked-domain list (MCU_RateLimiter::is_url_blocked) is now enforced. - FIXED: Added path traversal protection in
process_single_chapter_from_session— folder names are validated withrealpath()against the session extract path. - FIXED:
handle_multiple_chapters_uploadandprepare_zip_uploadcrashed with PHP fatal error when no ZIP file was uploaded (null array access). Addedis_arrayguards. - FIXED:
cleanup_temp_dirpath validation could pass onrealpath()returningfalse. Added explicitfalsechecks.
Bug Fixes
- FIXED: Removed global
remove_filter('intermediate_image_sizes_advanced', '__return_empty_array')call increate_chapter_from_imagesthat could break image generation for other plugins site-wide. - FIXED:
extract_images_from_htmlnow converts relative image URLs (/path/img.jpg) to absolute URLs using the base URL of the fetched page. - FIXED: Single chapter upload rejected chapter number
0due toempty()check. Now uses strict=== ''comparison. - FIXED:
cleanup_chapter_images_on_delete—scandir()returningfalseno longer causes a PHP warning. - FIXED:
push_series_to_latest_update—$update_resultis now initialized before the retry loop. - FIXED:
deactivate()now also clearsmcu_publish_scheduled_chaptercron events.
Performance
- Optimized: Chapter duplicate detection rewritten as a single indexed SQL query (was: fetch all chapter post IDs then N×
get_post_metacalls). Applied in single upload, ZIP batch processor, and REST API. - Optimized: Admin page chapter counts are now fetched in one
GROUP BYquery instead of one query per manga (N+1 fix). - Optimized: Removed redundant
$wpdb->replace()calls inpush_series_to_latest_update—update_post_meta()already handles insert/update. - Optimized: Transient cleanup queries now use prefix-only
LIKE 'value%'patterns (index-friendly) instead of leading-wildcardLIKE '%value%'. - Optimized: Logger only persists WARNING+ entries to the database option; DEBUG/INFO go to the log file only, reducing
wp_optionswrite load. - Optimized: Admin manga list query uses
no_found_rows => trueto skipSQL_CALC_FOUND_ROWS.
[1.7.2] - 2026-08-05 - Bug Fixes & Performance
Bug Fixes
- FIXED (Critical):
MCU_AdvancedFetcher::fetch_from_mangadex()was called asfetch_from_mangadexbut defined asfetch_from_mangadx— caused a PHP fatal error when fetching from mangadex.org. - FIXED (Security): Added missing
current_user_can('upload_files')permission checks tohandle_test_blogger_url,handle_auto_increment_chapter, andhandle_finalize_uploadAJAX handlers. - FIXED (Security): Added SSRF protection to URL fetch handlers — only
http/httpsschemes allowed, blocked-domain list (MCU_RateLimiter::is_url_blocked) is now enforced. - FIXED (Security): Added path traversal protection in
process_single_chapter_from_session— folder names are validated withrealpath()against the session extract path. - FIXED: Removed global
remove_filter('intermediate_image_sizes_advanced', '__return_empty_array')call increate_chapter_from_imagesthat could break image generation for other plugins site-wide. - FIXED:
handle_multiple_chapters_uploadandprepare_zip_uploadcrashed with PHP fatal error when no ZIP file was uploaded (null array access). Addedis_arrayguards. - FIXED:
cleanup_temp_dirpath validation could pass onrealpath()returningfalse. Added explicitfalsechecks. - FIXED:
extract_images_from_htmlnow converts relative image URLs (/path/img.jpg) to absolute URLs using the base URL of the fetched page. - FIXED: Single chapter upload rejected chapter number
0due toempty()check. Now uses strict=== ''comparison. - FIXED:
cleanup_chapter_images_on_delete—scandir()returningfalseno longer causes a PHP warning. - FIXED:
push_series_to_latest_update—$update_resultis now initialized before the retry loop. - FIXED:
deactivate()now also clearsmcu_publish_scheduled_chaptercron events.
Performance
- Optimized: Chapter duplicate detection rewritten as a single indexed SQL query (was: fetch all chapter post IDs then N×
get_post_metacalls). Applied in single upload, ZIP batch processor, and REST API. - Optimized: Admin page chapter counts are now fetched in one
GROUP BYquery instead of one query per manga (N+1 fix). - Optimized: Removed redundant
$wpdb->replace()calls inpush_series_to_latest_update—update_post_meta()already handles insert/update. - Optimized: Transient cleanup queries now use prefix-only
LIKE 'value%'patterns (index-friendly) instead of leading-wildcardLIKE '%value%'. - Optimized: Logger only persists WARNING+ entries to the database option; DEBUG/INFO go to the log file only, reducing
wp_optionswrite load. - Optimized: Admin manga list query uses
no_found_rows => trueto skipSQL_CALC_FOUND_ROWS.
[1.7.1] - 2026-06-22 - Bug Fixes
This release fixes critical bugs discovered during code review of v1.7.0.
Bug Fixes
- Fixed:
MCU_ZipProcessor::safe_recursive_deletewas private, causing errors when cleaning up chapter images. Added dedicatedsafe_delete_directory()method to the main class. - Fixed:
wp_cache_flush_group()is not a standard WordPress function, removed invalid calls. - Fixed:
wp_cache_delete('all', 'posts')invalid call removed from batch processor. - Fixed:
cleanup_chapter_images_on_deletehad logic error withrealpathvalidation - function would exit early if directory doesn't exist. - Fixed: Added missing
is_dir()check before path validation in cleanup function. - Fixed: Indentation issue in
cleanup_chapter_images_on_delete.
V1.7.0
[1.7.0] - 2026-06-22 - Security & Performance Update
This update focuses on security improvements, performance optimizations, and code quality enhancements.
Security Improvements
- Path Traversal Protection: Added validation for chunk upload IDs (alphanumeric only) and local ZIP file paths to prevent directory traversal attacks.
- File Extension Validation: Chunk uploads now only accept ZIP files.
- Rate Limiting: Added rate limiting to ZIP preparation endpoint.
- Secure Path Validation: Chapter image cleanup now validates paths before deletion.
- Nonce Consistency: Unified nonce verification across all AJAX handlers.
Performance Optimizations
- Targeted Cache Clearing: Replaced aggressive
wp_cache_flush()calls with specificclean_post_cache(). - Optimized Option Loading: Added
autoload=noto large option data (logs, batch queue). - Improved Duplicate Detection: Chapter duplicate checking now uses floatval normalization.
- Reduced Timeout: Changed
download_url()timeout from 300s to 30s.
Code Quality
- Unified Title Creation: Created shared
MangaChapterUploader::create_chapter_title()andMangaChapterUploader::get_prefix_text()methods. - Removed Duplicate Code: Eliminated redundant cron schedule definitions.
- Enhanced Validation: Improved input validation across all handlers.
V1.5.0
[1.5.0] - 2026-04-21 - Bug Fix & Code Quality Release 🛠️
This release focuses on resolving logic errors, code quality improvements, and stability fixes identified through code review. No new user-facing features are introduced; all changes improve reliability and correctness.
🐛 Bug Fixes
manga-uploader-extensions.php
- FIXED: Variable shadowing in
fetch_from_webtoons()— the$urlfunction parameter was being silently overwritten inside theforeachloop processing image URLs, causing the wrong URL to be passed toextract_chapter_from_webtoons_url(). Renamed loop variable to$img_url. - FIXED: Dead code / incorrect ternary in
update_manga_timestamp()— both branches of($key === 'ts_edit_post_push_cb') ? $current_time : $current_timereturned the same value. Timestamp meta keys now correctly receive a Unix timestamp ($timestamp) while date-string meta keys receive$current_time. - FIXED: Duplicate
mcu_publish_scheduled_chapterhook registration — the hook was registered both inMangaChapterUploader::__construct()(main plugin) and at the bottom of the extensions file, causing the scheduled chapter publisher to fire twice per event. The redundant registration in extensions has been removed. - FIXED:
MCU_ScheduledPublisher::publish_scheduled_chapter()was instantiatingnew MangaChapterUploader()to callpush_series_to_latest_update(). Creating a new instance re-registers all AJAX and WordPress hooks, leading to duplicate callbacks. Now uses the existing global$manga_chapter_uploaderinstance instead. - FIXED: Typo in
fetch_from_mangadex()regex pattern —mangadxcorrected tomangadex. The previous pattern never matched any real MangaDex image URLs.
includes/class-chunk-uploader.php
- FIXED: Division by zero risk in
handle_chunk_upload()— progress percentage calculationcount(...) / $total_chunkswould produce a fatalDivision by zeroerror if$total_chunkswas0. Added a guard: returns0when$total_chunksis not positive.
manga-chapter-uploader.php
- FIXED: Unnecessary
global $mcu_loggerdeclaration —MCU_Loggeris a fully static class and requires no instance. The unused global variable declaration has been removed to avoid confusion. - FIXED: Redundant
sprintf()wrapping a translation call with no format placeholders inadmin_notices(). If a translator's string contained%characters this could trigger a PHP warning. Changed to a direct__()call.
🔧 Technical Improvements
- UPDATED: Plugin header
Tested up tobumped from6.4to6.7 - CLEANED: Removed dead switch case
'mangadx.org'fromMCU_AdvancedFetcher::fetch_from_url()(was unreachable after the typo fix)
⬆️ Upgrade Notes
- Automatic: No manual intervention required
- Database: No schema changes
- Settings: All existing settings are fully preserved
- Compatibility: Full backward compatibility maintained
🛠️ Critical Fixes
- FIXED: Image mixing between chapters in batch uploads - eliminated cross-chapter image contamination
- FIXED:
wp_handle_sideload()file deletion causing image confusion between different chapters - IMPLEMENTED: Each chapter now uses isolated temporary directory (
temp_chapter_{number}_{uniqid}) - ENHANCED: File isolation system with unique image copies per chapter to prevent WordPress file conflicts
- ADDED: Advanced logging for image processing debugging and troubleshooting
🚀 Technical Improvements
- NEW: Isolated file processing system - each chapter gets its own temporary workspace
- ENHANCED: Unique filename generation:
{folder}_ch{number}_img{index}_{original}format - IMPROVED: Safe file copying before WordPress media processing to prevent file deletion conflicts
- OPTIMIZED: Temporary directory cleanup with per-chapter isolation and automatic cleanup
- STRENGTHENED: File existence and readability checks before processing
🔍 What This Fixes
- ✅ Chapter Image Separation: Chapter 1 images no longer appear in Chapter 2 or vice versa
- ✅ Proper Image Segregation: Complete isolation of images in multi-chapter ZIP uploads
- ✅ File Path Conflicts: No more file path conflicts between different chapters
- ✅ WordPress Integration: Eliminated
wp_handle_sideload()file deletion issues that caused image mixing - ✅ Batch Upload Reliability: Multi-chapter uploads now maintain perfect image integrity per chapter
V1.6.0
V1.6.0- Performance & Stability Update 🚀
This major update drastically improves bulk upload performance, resolves critical timeout issues with large ZIP files, and fixes chronologic sorting issues for bulk chapters.
🚀 Performance Optimizations
- Fast Sideload Mode: The chapter upload process was completely rewritten to bypass the WordPress Media Library. Images are now directly saved to
wp-content/uploads/manga_chapters/. - Zero Database Overhead: Removed the redundant database INSERT queries for each individual image, resulting in near-instantaneous chapter processing.
📦 Stability & Fixes
- Chunk Uploading System: Integrated a chunked upload system (2MB chunks) to safely process massive ZIP files (up to 5GB) without hitting server
upload_max_filesizeor connection timeout limits. - Extraction Timeout Fix: Disabled PHP execution time limits (
@set_time_limit(0)) and increased memory limits during the ZIP extraction phase to prevent silent failures on massive archives. Added robust fallback logic to handle chunk-assembled files. - Timestamp Overflow Fix: Corrected a critical timestamp miscalculation that occurred with high chapter numbers (e.g., 300+). The system now uses a batch-relative index rather than an absolute chapter number, accurately sorting up to 1440 chapters sequentially in a single batch without jumping into future dates.
🧹 Improvements
- Garbage Collection Hooks: Added
before_delete_postandwp_trash_posthooks. Deleting a chapter from the WordPress admin panel now automatically cleans up its associated isolated image folder from the server, preventing orphaned files. - UI Updates: Added a prominent "Support the Developer" (Ko-fi) button to the plugin admin header.
V1.4.0
🔄 Güncelleme Notları
v1.4.0 - Büyük Kararlılık ve Performans Güncellemesi
🛠️ Kritik Düzeltmeler
- DÜZELTİLDİ: Sıralı bölüm düzeni - artık karışık sıralama yok (161,163,162 → 160,161,162,163...)
- DÜZELTİLDİ: Zamanlanmış post sorunları - tüm bölümler artık anında yayınlanıyor
- DÜZELTİLDİ: PHP dosya işlem hataları (unlink, filesize uyarıları ortadan kaldırıldı)
- DÜZELTİLDİ: WordPress cron hataları, özel schedule tanımları ile çözüldü
- DÜZELTİLDİ: Ana sayfa itme sistemi güvenilirlik için tamamen yeniden yapıldı
🚀 Performans İyileştirmeleri
- YENİ: Garantili bölüm sırası için sıralı işleme sistemi
- YENİ: Detaylı durum güncellemeleri ile gerçek zamanlı ilerleme takibi
- YENİ: Gelişmiş hata yönetimi ve kurtarma mekanizmaları
- YENİ: Daha iyi performans için optimize edilmiş dosya işlemleri
- YENİ: Debug için gelişmiş loglama sistemi
🎛️ Yeni Özellikler
- YENİ: Yapılandırılabilir ZIP dosya boyutu limitleri (100MB - 5GB)
- YENİ: Daha fazla özelleştirme seçeneği ile geliştirilmiş ayarlar sayfası
- YENİ: Kapsamlı debug bilgisi görüntüleme
- YENİ: Daha iyi tema uyumluluğu için çoklu meta alanı desteği
- YENİ: Zorla ana sayfa görünüm sistemi
🔧 Teknik İyileştirmeler
- GELİŞTİRİLDİ: Güvenli recursive dizin işlemleri
- GELİŞTİRİLDİİ: Gelişmiş cache yönetimi
- GELİŞTİRİLDİ: Daha iyi WordPress hook entegrasyonu
- GELİŞTİRİLDİ: Kapsamlı transient temizleme
- GELİŞTİRİLDİ: Geliştirilmiş tema uyumluluğu
V1.3.3
Manga Chapter Uploader v1.3.3 - Release Notes
🚀 Major Features
Configurable ZIP File Size Limits
- NEW: ZIP file size limits are now configurable from Settings page
- Available options: 100MB, 200MB, 500MB, 1GB, 2GB, 5GB
- Default: 500MB (increased from previous 100MB hardcoded limit)
- Smart validation: Real-time file size checking with user feedback
Enhanced User Experience
- Real-time file size display when selecting ZIP files
- Visual feedback with color-coded size warnings
- Dynamic limit updates based on admin settings
- Improved error messages for oversized files
⚙️ Technical Improvements
Performance Optimizations
- Extended timeout for large ZIP files (15 minutes for multiple uploads)
- Progressive upload tracking with enhanced progress indicators
- Memory-efficient processing for large file operations
- Optimized ZIP extraction with better error handling
Admin Interface Enhancements
- Settings page expansion with new ZIP size configuration
- Visual requirements display on upload forms
- Server compatibility warnings for large file uploads
- Better form validation with instant feedback
Code Quality & Security
- Enhanced input validation for all file upload endpoints
- Improved error handling with detailed debugging information
- Backward compatibility maintained for existing installations
- Secure file processing with additional safety checks
🔧 Configuration Options
New Settings
- Maximum ZIP File Size: Configurable from 100MB to 5GB
- Server Warnings: Automatic detection of potential server limitations
- Smart Defaults: Intelligent selection based on server capabilities
Enhanced Validation
- Client-side validation prevents upload attempts of oversized files
- Server-side verification as final safety check
- User-friendly error messages with specific size information
- Guidance for server configuration when limits are reached
📱 User Interface Updates
Multiple Chapter Upload
- Visual ZIP requirements displayed prominently
- File size information shown immediately upon selection
- Status indicators for file validation
- Clear error messaging for various failure scenarios
Form Improvements
- Consistent styling across all upload methods
- Better responsive design for various screen sizes
- Enhanced accessibility with improved labels and descriptions
- Streamlined workflow with logical form progression
🐛 Bug Fixes
File Processing
- Fixed: ZIP extraction issues with certain folder structures
- Fixed: Memory leaks during large file processing
- Fixed: Timeout issues with slow server responses
- Fixed: Character encoding problems in folder names
User Interface
- Fixed: Form reset issues after successful uploads
- Fixed: Progress bar inconsistencies
- Fixed: Category auto-selection edge cases
- Fixed: File input clearing problems
📋 Migration Notes
For Existing Users
- Automatic migration: Existing installations will use 500MB default limit
- No data loss: All existing functionality preserved
- Settings upgrade: New options available immediately after update
- Backward compatibility: Older ZIP processing methods still supported
For Server Administrators
- PHP Configuration: May need adjustment for larger file uploads
- Recommended settings for optimal performance:
upload_max_filesize: Set to match or exceed selected ZIP limitpost_max_size: Should be larger thanupload_max_filesizemax_execution_time: 900 seconds or higher for large filesmemory_limit: 512M or higher recommended
🔄 Compatibility
WordPress Compatibility
- WordPress: 5.0+ (unchanged)
- PHP: 7.4+ (unchanged)
- Required extensions: ZipArchive (for multiple uploads)
- Theme compatibility: MangaReader themes (unchanged)
Browser Support
- Modern browsers: Full feature support
- File API: Required for drag-and-drop functionality
- JavaScript: Enhanced validation and user feedback
📚 Documentation Updates
New Documentation
- ZIP size configuration guide
- Server optimization recommendations
- Troubleshooting large file uploads
- Performance tuning guide
Updated Guides
- Installation instructions with server requirements
- Configuration examples for various hosting environments
- Best practices for large manga collections
- FAQ updates covering new features
🛠️ Developer Notes
API Changes
- New option:
mcu_max_zip_sizefor storing ZIP size limits - Enhanced validation: Additional checks in upload handlers
- Extended timeouts: Configurable timeout values
- Improved logging: Better error tracking and debugging
Extension Points
- Filter hooks: For customizing ZIP size limits programmatically
- Action hooks: For monitoring large file uploads
- Validation filters: For custom file size logic
- Progress callbacks: For custom upload progress handling
🚨 Important Notes
Server Requirements
Large ZIP files require adequate server configuration. Ensure your hosting environment can handle:
- File uploads up to your selected limit
- Sufficient PHP memory allocation
- Extended execution time limits
- Adequate disk space for temporary file extraction
Performance Considerations
- Large ZIP files may take significant time to process
- Users should be informed about expected processing times
- Server load may increase during large file operations
- Consider scheduling large uploads during off-peak hours