PHPackages                             nystudio107/craft-templatecomments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. nystudio107/craft-templatecomments

ActiveCraft-plugin[Templating &amp; Views](/categories/templating)

nystudio107/craft-templatecomments
==================================

Adds a HTML comment with performance timings to demarcate `{% block %}`s and each Twig template that is included or extended.

5.0.6(3mo ago)20108.4k↓35.1%1[2 PRs](https://github.com/nystudio107/craft-templatecomments/pulls)3MITPHPPHP ^8.2CI passing

Since Oct 2Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/nystudio107/craft-templatecomments)[ Packagist](https://packagist.org/packages/nystudio107/craft-templatecomments)[ GitHub Sponsors](https://github.com/khalwat)[ RSS](/packages/nystudio107-craft-templatecomments/feed)WikiDiscussions develop-v5 Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (34)Used By (3)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/25c6a0bacd3d3c65fcc052deb224c4ab3d511ad29c1d76612ebcf06ca64ce0bd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e7973747564696f3130372f63726166742d74656d706c617465636f6d6d656e74732f6261646765732f7175616c6974792d73636f72652e706e673f623d7635)](https://scrutinizer-ci.com/g/nystudio107/craft-templatecomments/?branch=v5) [![Code Coverage](https://camo.githubusercontent.com/344c97e099705396812538ad3ab06d48218bfeedede0d56ad8f54ad7af6760a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e7973747564696f3130372f63726166742d74656d706c617465636f6d6d656e74732f6261646765732f636f7665726167652e706e673f623d7635)](https://scrutinizer-ci.com/g/nystudio107/craft-templatecomments/?branch=v5) [![Build Status](https://camo.githubusercontent.com/7cdda0d00305c47f076b0d3807e432ee0cb776cd6430a4437a0c616415d0ced0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e7973747564696f3130372f63726166742d74656d706c617465636f6d6d656e74732f6261646765732f6275696c642e706e673f623d7635)](https://scrutinizer-ci.com/g/nystudio107/craft-templatecomments/build-status/v5) [![Code Intelligence Status](https://camo.githubusercontent.com/734950fc41714ac13cf76159570ce83c4538d4058d2f65b1e4e2b3ec242305e8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e7973747564696f3130372f63726166742d74656d706c617465636f6d6d656e74732f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d7635)](https://scrutinizer-ci.com/code-intelligence)

Template Comments plugin for Craft CMS 5.x
==========================================

[](#template-comments-plugin-for-craft-cms-5x)

Adds a HTML comment with performance timings to demarcate `{% block %}`s and each Twig template that is included or extended.

[![Screenshot](./docs/docs/resources/img/plugin-logo.png)](./docs/docs/resources/img/plugin-logo.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 5.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require nystudio107/craft-templatecomments

    ```
3. Install the plugin via `./craft install/plugin templatecomments` via the CLI, or in the Control Panel, go to Settings → Plugins and click the “Install” button for Template Comments.

You can also install Template Comments via the **Plugin Store** in the Craft Control Panel.

Documentation
-------------

[](#documentation)

Click here -&gt; [Template Comments Documentation](https://nystudio107.com/plugins/template-comments/documentation)

Template Comments Roadmap
-------------------------

[](#template-comments-roadmap)

Some things to do, and ideas for potential features:

- Support wrapping macros in comments

Brought to you by [nystudio107](https://nystudio107.com/)

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance79

Regular maintenance activity

Popularity39

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~95 days

Recently: every ~107 days

Total

29

Last Release

108d ago

Major Versions

v1.x-dev → 4.0.12024-04-19

4.0.1 → 5.0.02024-04-19

4.0.2 → 5.0.22024-09-03

4.0.3 → 5.0.32024-09-06

v4.x-dev → 5.0.42024-11-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7570798?v=4)[Andrew Welch](/maintainers/khalwat)[@khalwat](https://github.com/khalwat)

---

Top Contributors

[![khalwat](https://avatars.githubusercontent.com/u/7570798?v=4)](https://github.com/khalwat "khalwat (132 commits)")

---

Tags

craft-plugincraftcmsdebuggingtwig-commentstwigdebuggingcommentscraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/nystudio107-craft-templatecomments/health.svg)

```
[![Health](https://phpackages.com/badges/nystudio107-craft-templatecomments/health.svg)](https://phpackages.com/packages/nystudio107-craft-templatecomments)
```

###  Alternatives

[nystudio107/craft-twigpack

Twigpack is a bridge between Twig and webpack, with manifest.json &amp; webpack-dev-server HMR support

97341.4k17](/packages/nystudio107-craft-twigpack)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.5k1](/packages/wbrowar-guide)[nystudio107/craft-emptycoalesce

Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty.

28143.7k3](/packages/nystudio107-craft-emptycoalesce)[jalendport/craft-preparse

A fieldtype that parses Twig when an element is saved and saves the result as plain text.

1086.4k](/packages/jalendport-craft-preparse)[viget/craft-classnames

Classnames plugin for Craft CMS

1115.5k1](/packages/viget-craft-classnames)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
