Rongcon QR & Shortlink Generator
Creates dynamic QR codes and shortened links with time-limited security, detailed statistics, and custom logo watermark support.
by Gemini & Rồng Con HG · github.com/rchg2025/rchg-my-qrcode
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/rchg2025/rchg-my-qrcode/archive/refs/heads/main.zipCreate dynamic QR codes and short URLs with time-limited security, detailed statistics, and custom logo watermark support.
Description
Rongcon QR & Shortlink Generator is a powerful WordPress plugin that helps you create dynamic QR codes and shortened URLs easily. The plugin features unique security with time-limited QR codes to prevent unauthorized screenshot sharing.
Key Features
- Generate QR codes and short URLs from any long URL
- Time-limited QR codes with automatic expiration (configurable in seconds)
- Permanent short links that never expire (only QR codes have time limits)
- Custom logo/watermark overlay on QR code center
- Detailed statistics with daily, weekly, monthly charts
- 6 beautiful color options for QR codes
- High-quality PNG export with logo
- Flexible shortcode for displaying dynamic QR anywhere
- Auto-refresh QR codes based on configured interval
- Server-side QR generation with caching
- Copy to clipboard functionality
- CSV export for statistics
Use Cases
- Events/Conferences: Time-limited check-in QR codes that auto-expire after event
- Promotions/Flash Sales: Limited-time offer QR codes with automatic expiration
- Security: Prevent unauthorized QR sharing - old codes cannot be scanned
- Education: Time-limited assignment/resource QR codes
- Marketing: Track campaign effectiveness with detailed statistics
How It Works
The plugin creates a unique security token for each QR code based on the configured time interval. When someone scans a QR code (with ?qr=1 parameter), the system validates the token. Old tokens automatically expire, making the QR code unusable. However, regular short links (without the QR parameter) remain permanently valid for manual sharing.
Shortcodes
Display dynamic QR code with countdown:
[my_dynamic_qr id="123" refresh="60"]
id- Shortlink post ID (required)refresh- Auto-refresh interval in seconds (optional)
Display QR generator form:
[my_qr_generator]
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- GD Library (for logo image processing)
- phpqrcode library (via Composer, for server-side PNG generation)
Privacy & Security
- No personal data collection
- All data stored in your WordPress database
- QR codes cached for 1 hour for performance
- Security tokens use WordPress wp_salt()
- No external API calls or tracking
Installation
Automatic Installation
- Go to Plugins > Add New in your WordPress admin
- Search for "Rongcon QR & Shortlink Generator"
- Click Install Now and then Activate
Manual Installation
- Download the plugin ZIP file
- Upload the
my-qr-generatorfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
Required: Install Dependencies
For server-side PNG generation support (required for PNG endpoint):
- Open terminal in the plugin directory
- Run:
composer install
This will install the phpqrcode library from Composer. The plugin will work without Composer (client-side QR still functions), but the PNG endpoint requires phpqrcode.
After Installation
- Go to "QR Generator" menu in WordPress admin
- Create your first short link
- (Optional) Go to Settings to upload a logo
- Use shortcode to display QR codes on pages
Frequently Asked Questions
How do I create a time-limited QR code?
- Go to "Link List" and click "Manage Dynamic"
- Enter seconds in "QR Change Seconds" field (e.g., 60 = 1 minute)
- Click "Save Changes"
- QR code will auto-rotate and old codes become invalid after the configured interval
Do short links expire?
No. Only QR codes (when scanned with ?qr=1 parameter) have time limits. Regular short links (clicked/pasted without QR parameter) work permanently and never expire.
How do I add a logo to QR codes?
- Go to "QR Generator > Settings"
- Click "Choose Logo"
- Upload image (recommended: square 150x150px, transparent PNG)
- Click "Save Settings"
The logo will appear centered on all QR codes when downloaded as PNG or viewed via the PNG endpoint.
QR code not displaying?
Check:
- QRCode.js library loaded (check browser Console for errors)
- Clear browser cache (Ctrl+F5 or Cmd+Shift+R)
- Plugin conflicts (disable other plugins to test)
- JavaScript errors in browser console
How do I view statistics?
- Go to "Link List" in the plugin menu
- Click "Statistics" button next to any link
- Choose time range: 7 days, 30 days, or 90 days
- View scan count charts and download CSV exports
Shortcode not working?
Ensure:
- Shortlink ID is correct (check in Link List)
- Format is correct:
[my_dynamic_qr id="123"] - Plugin is activated
- No JavaScript errors in browser console
Can I customize QR code colors?
Yes. There are 6 colors available: Black, Blue, Red, Green, Orange, Purple. Choose color when creating or downloading QR codes.
Is this plugin compatible with Gutenberg?
Yes. Use the Shortcode block and paste [my_dynamic_qr id="123"] or [my_qr_generator] into it.
Can I export statistics data?
Yes. Click "Export CSV" on the Statistics page to download scan data in CSV format for individual links or aggregated across all links.
Is this plugin free?
Yes. Completely free and open source (GPL2+). No premium version or paid features.
Does this plugin make external API calls?
No. All QR generation and processing happens locally on your WordPress server. No data is sent to external services.
Screenshots
- QR code generator interface with color options
- Link list with ID and shortcode for easy copying
- Link management with time-limited QR settings
- Statistics page with detailed charts
- Logo/watermark settings page
- Dynamic QR with countdown timer on frontend
- QR code with centered logo watermark
Changelog
1.9
- Security: Fixed all output escaping with wp_kses_post() and PHPCS annotations for binary data
- Security: Replaced all wp_redirect() with wp_safe_redirect() for safer redirects
- Security: Fixed missing wp_unslash() on POST input sanitization
- Security: Added comprehensive PHPCS ignore annotations with context for valid edge cases
- Improved: Replaced all date() calls with wp_date() for timezone-safe date formatting
- Improved: Replaced direct DELETE queries with WordPress delete_option() API for transient cleanup
- Improved: Updated readme "Tested up to" WordPress 6.9
- Improved: Reduced tags to 5 items per WordPress guidelines
- Fixed: Stats page UI labels now in English (7 days, 30 days, 90 days, Filter, Export CSV)
- Fixed: Class naming convention with backward compatibility annotation
1.8
- Security: Fixed nonce sanitization using sanitize_text_field() and wp_unslash()
- Security: Added sanitize_callback for register_setting()
- Improved: Localized all CDN files (qrcode.js, chart.js) to comply with WordPress guidelines
- Improved: Converted all inline scripts to wp_enqueue_script() and wp_add_inline_script()
- Improved: All readme documentation now in English
- Changed: Plugin name to "Rongcon QR & Shortlink Generator" for better distinction
- Changed: Text domain remains "my-qr-generator" pending slug reservation
- Note: imagedestroy() is not deprecated - false positive from automated checker
1.7
- New: Time-limited QR codes to prevent unauthorized sharing
- New: Permanent short links work alongside time-limited QR codes
- New: Security tokens using WordPress wp_salt() for each interval
- New: Countdown timer showing remaining QR validity time
- Improved: Time limit logic, hide countdown when not needed
- Improved: Copy shortcode script uses modern Clipboard API
- Improved: QR preview in admin works more reliably
- Fixed: Download PNG button works correctly with canvas and img elements
- Fixed: Media uploader for logo settings
- Fixed: Removed deprecated dynamic rules code
1.6
- New: Custom logo/watermark overlay on QR center
- New: [my_dynamic_qr] shortcode with auto-refresh
- New: Detailed statistics with Chart.js graphs
- New: CSV export by time range
- Improved: QR PNG caching with transients
- Improved: Multiple QR color support
1.5
- New: Dynamic shortlink functionality
- New: Multiple link management
- Improved: Optimized database queries
1.0
- Initial release
- Basic QR code generation
- Short URL functionality
Upgrade Notice
1.8
Important security and compliance update. All nonce checks now properly sanitized. CDN files localized. Recommended upgrade for WordPress.org compliance.
1.7
Important update with time-limited QR security feature. Recommended upgrade to prevent unauthorized QR code sharing.
Support
For support, feature requests, or bug reports:
- Website: https://rongcon.net
- Email: support@rongcon.net
Contributing
This is an open-source plugin. Contributions are welcome via GitHub.
Credits
- QRCode.js v1.0.0 for client-side QR generation (bundled locally)
- Chart.js v4.4.0 for statistics visualization (bundled locally)
- phpqrcode for server-side PNG generation (via Composer)