πŸ”₯ Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer β†’
Account Get it free
Commentcode API icon
Possibly abandoned Tested up to 4.7.0

Commentcode API

A shortcode API alternative.

Active installs<10New
Downloads Β· 30d38β–² +52% vs prev. 30d
Ratingβ€”0 reviews
Health score21/100At risk
All-time downloads1.3KSince Dec 2016
Support resolvedβ€”No recent threads
RequiresWP 3.4PHP any
Downloads Β· 7d10β–Ό -9.1% week over week
Our verdict

Consider an alternative

Commentcode API shows warning signs in 2026 β€” compare the alternatives below before installing. Was last updated 10 years ago, and scores 21/100 on our health check.

  • Small user base (<10 active installs)
  • Very few reviews so far
  • No update in 9 years
  • Only tested up to WordPress 4.7 (latest is 7.1)

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

123Sep 4Oct 18Dec 2
Yesterday2
Daily average (1y)1
Peak day4Mar 23, 2026
Last 12 months236

Download spikes usually follow a new release β€” each site that auto-updates counts as a download.

Rankings

Where Commentcode API stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
api >100 10,000 Best api plugins β†’
commentcode #1 1 Best commentcode plugins β†’
HTML comments >100 3,461 Best HTML comments plugins β†’
shortcode >100 10,000 Best shortcode plugins β†’

About Commentcode API

From the official readme Β· v1.0.0

Description

Generate Custom Outputs with HTML Comments

Commentcode API lets you generate custom outputs with HTML comment-like codes.

It is similar to the Shortcode API except it takes a form of HTML comments and some few features.

Since it takes a form of HTML comments, even the user disables your plugin, the embedded code will not be visible, on contrary to shortcodes that remain in posts when their plugins are deactivated.

Does not leave a mess in posts

Say, you have been using a plugin that converts a plugin specific shortcode into custom outputs. Later you found something else that is more useful and uninstalled it.

But the shortcodes used by that plugin remained in hundreds of posts and it was too much work to manually delete them so you have to ask somebody to run SQL commands.

That’s a problem. What if the shortcode takes a form of an HTML comment? It won’t leave such a mess.

Syntax

It looks like this.

<!--- tag foo="bar" --->



<!--- tag color="#333" ---><p>Some outputs.</p><!--- /tag --->

Notice that tripe dashes are used in the both opening and closing part. So it won’t hardly conflict with generic HTML comments.

Supports Multi-dimensional Array Arguments

The shortcode cannot pass multi-dimensional arguments to the callback function.

The below attributes won’t be parsed.

[my_shortcode foo[1]="one" foo[2]="two"]

However, commentcode can handle it.

<!---my_shortcode foo[1]="one" foo[2]="two" --->

The attributes are interpreted as

array(
    'foo'   => array(
        1 => 'one',
        2 => 'two',
    )
)

Preserved Letter Cases

The shortcode does not allow capitalized attribute names.

[my_shortcode CapitalName="I need it to be capitalized"]

The attribute is interpreted as

array(
    'capitalname' => 'I need it to be capitalized',
)

This is not useful when you need to perform remote API requests which require argument names with capital letters.

However, the commentcode API preserves those argument names.

<!--- my_shortcode CapitalName="Please keep capitalization!" --->

will be

array(
    'CapitalName'   => 'Please keep capitalization!',
)

Register a Commentcode

Use the add_commentcode() function. It accepts two parameters.
1. (string) the commentcode tag.
2. (callable) a callback function which gets called when the commentcode of the specified tag is processed.

The callback function receives three parameters.
1. (string) The filtered text, usually an empty string.
2. (array) The attributes set in the commentcode.
3. (string) The commentcode tag name.

function get_my_commentcode( $text, $arguments, $tag ) {
    return "<pre>" . htmlspecialchars( print_r( $arguments, true ) ) . "</pre>";
}
add_commentcode( 'my_commentcode', 'get_my_commentcode' );

For a test, while running the above code, try inserting <!---my_commentcode Foo="bar" numbers[ 1 ]="one" numbers[ 2 ]="two"---> in a post.

It will produce this output,

Array
(
    [Foo] => bar
    [numbers] => Array
        (
            [1] => one
            [2] => two
        )

)

Installation

  1. Upload commentcode-api.php and other files compressed in the zip folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Changelog

1.0.0

  • Released.

Full changelog on WordPress.org β†’

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own β€” no account needed.

Active installs badge Rating badge Health score badge

Best Commentcode API alternatives

All api plugins β†’
Alternatives
Rank Plugin Active installs Rating Updated Health
1 WP Consent API WP Consent API Simple Consent API to read and register the current consent category. by Rogier Lankhorst 300K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (2) 2 days ago 76
2 Disable REST API Disable REST API Disable the use of the REST API on your website to site users. Now with User Role support! by Dave McHale 80K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.8 (38) 3 years ago 37
3 Mailgun for WordPress Mailgun for WordPress Easily send email from your WordPress site through Mailgun using the HTTP API or SMTP. by Mailgun 70K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 3.8 (50) 2 months ago 81
4 Make Connector Make Connector Make Connector. Make lets you design, build, and automate by connecting with WordPress in… by Make 70K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 2.9 (27) 4 weeks ago 70
5 Disable WP REST API Disable WP REST API Disables the WP REST API for visitors not logged into WordPress. by Jeff Starr 30K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.8 (36) 4 months ago 84
6 WP REST Cache WP REST Cache Enable caching of the WordPress REST API and auto-flush caches upon wp-admin editing. by Acato 10K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.9 (42) 3 days ago 89
7 WPGraphQL for ACF WPGraphQL for ACF WPGraphQL for ACF seamlessly integrates Advanced Custom Fields with WPGraphQL. by Jason Bahl 10K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (1) 1 week ago 75
8 WPGet API – Connect to any external REST API WPGet API – Connect to any external REST API Connect any REST API to WordPress. WPGet API enables easy API integration, allowing you to… by David Anderson / Team Updraft 10K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 5 (32) 2 weeks ago 94
9 WordPress REST API (Version 2) WordPress REST API (Version 2) Access your site's data through an easy-to-use HTTP REST API. (Version 2) by Ryan McCue 10K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.2 (34) 9 years ago 43
10 WP REST API Controller WP REST API Controller Enable a UI to toggle visibility and customize properties in WP REST API requests. by Evan Herman 7K+ β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜… 4.3 (12) 4 years ago 38

FAQ

Commentcode API: quick answers

Straight answers, pulled from live WordPress.org data.

Source: WordPress.org

Is Commentcode API free?

Yes. Commentcode API is free to download and use from the official WordPress.org plugin directory.

Is Commentcode API safe to use in 2026?

Commentcode API shows warning signs in 2026 β€” compare the alternatives below before installing. Was last updated 10 years ago, and scores 21/100 on our health check.

How many websites use Commentcode API?

Commentcode API is active on <10 WordPress websites and has been downloaded 1,269 times since it launched in December 2016. It was downloaded 38 times in the last 30 days.

Does Commentcode API work with WordPress 7.1?

Commentcode API is officially tested up to WordPress 4.7.0, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

When was Commentcode API last updated?

The latest version, 1.0.0, was released on December 21, 2016 (10 years ago).

Who makes Commentcode API?

Commentcode API is developed and maintained by miunosoft.

What are the best alternatives to Commentcode API?

The most popular alternatives to Commentcode API are WP Consent API (300K+ installs), Disable REST API (80K+ installs) and Mailgun for WordPress (70K+ installs).

Powered by PageForge

One template and a spreadsheet. A real page for every search.

PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.

  • CSV and XLSX, plus Google Sheets on Professional and Enterprise
  • Its own title, URL, SEO fields and schema for every page
  • Works with the block editor, Elementor, Divi and Avada
  • Free on WordPress.org, no credit card

↑↓ to move↡ to open