BACK TO DIRECTORY

URL Shortener by Melk

by melksedeque

0.0
(0 ratings)

URL Shortener by Melk is a lightweight and efficient WordPress plugin that allows you to automatically generate short URLs for your posts, pages, categories, tags, and Custom Post Types. Ideal for sharing on social media and marketing materials.

Features:

  • Automatic Generation: Automatically creates short URLs when publishing new posts.
  • Comprehensive Support: Works with Posts, Pages, Categories, Tags, and Custom Post Types.
  • Quick Copy: “Copy” button directly in the post/term listing in the admin panel.
  • Bulk Generation: Tool to generate short URLs for old content with one click.
  • Performance: Fast redirection using native WordPress rewrite rules (no heavy queries).
  • Secure: Validated and secure code, following WordPress best practices.

Developer Notes

  • Namespace: Melk\\UrlShortenerByMelk.
  • Unique prefix: all functions, options, meta keys and hooks use the urlshbym_ prefix, following the WordPress Plugin Handbook recommendations to avoid naming collisions.
  • Options stored in the database:
    • urlshbym_enabled_post_types
    • urlshbym_enabled_taxonomies
  • Meta keys:
    • _urlshbym_short_code on posts
    • _urlshbym_short_code on terms (taxonomies)
  • Database table: {$wpdb->prefix}urlshbym_short_urls is created on activation to store the mapping between short codes and objects.
  • Main hook:
    • urlshbym_short_url_clicked — fired whenever a short URL is accessed, receiving the short code and the internal record ID.
  • Rewrite rules: short URLs are handled through a rewrite rule that maps patterns like /abc12 to index.php?urlshbym_short=abc12.

Screenshots

Admin settings page where you can choose post types and taxonomies.

Admin settings page where you can choose post types and taxonomies.

Quick copy button in the posts list table.

Quick copy button in the posts list table.

Bulk generation tool for existing content.

Bulk generation tool for existing content.

Plugin Details

Active Installs
0
Total Downloads
312
Version
1.0.0
Requires WP
5.0
Requires PHP
7.4
Tested Up To
6.9.7
Added
2026-01-26
Last Updated
2026-01-26 4:37pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0