Title: Feature request: Line count
Last modified: September 10, 2026

---

# Feature request: Line count

 *  Resolved [Sean Conklin](https://wordpress.org/support/users/seanconklin/)
 * (@seanconklin)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/feature-request-line-count/)
 * Hello,
 * Whenever I come across an error in the logs like the following, I realize that
   I could use a column for Line Count in the list of active Snippets. This would
   help more quickly identify which of the Snippets could be causing a rather generic
   error to show up in the logs.
 * Here’s a sample error log where one needs to locate snippets that contain at 
   least 151 lines of code to review each:
 *     ```wp-block-code
       PHP Warning: Trying to access array offset on false in /srv/htdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(822) : eval()'d code on line 151
       ```
   
 * Thank you,

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Imants](https://wordpress.org/support/users/0aksmith/)
 * (@0aksmith)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/feature-request-line-count/#post-19017435)
 * Hi Sean,
 * Thank you for the suggestion. A line-count column could help narrow down warnings
   like this, and we are already looking into ways to make error messages identify
   the affected snippet more clearly.
 * Code Snippets 3.10.2 includes improved reporting for errors detected while activating
   snippets, including the error details and a captured stack trace. Runtime warnings
   can still be less specific because database-backed PHP snippets are executed 
   using PHP’s `eval()` function. PHP can report line 151 within the evaluated code,
   but it does not know the snippet’s name or database ID. Several snippets could
   also contain a line 151, so that information alone cannot reliably identify the
   responsible snippet.
 * As an alternative, you could enable File-Based Execution under **Snippets** >**
   Settings**. Each PHP snippet is then executed from its own generated file, with
   the snippet ID included in the filename. This can provide more useful file paths
   and line numbers in PHP logs and stack traces. The reported line may differ slightly
   from the editor because the generated file includes a small safety header.
 * You can read more here:
 * [https://codesnippets.pro/doc/file-based-execution/](https://codesnippets.pro/doc/file-based-execution/)
 *  Thread Starter [Sean Conklin](https://wordpress.org/support/users/seanconklin/)
 * (@seanconklin)
 * [2 weeks, 5 days ago](https://wordpress.org/support/topic/feature-request-line-count/#post-19017953)
 * On this site there were only three Code Snippets that had 151+ lines and only
   one which had an array reference missing `isset()`, so that resolution was fast
   once I narrowed down the snippets. Thanks for the tip on file-based execution!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffeature-request-line-count%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Sean Conklin](https://wordpress.org/support/users/seanconklin/)
 * Last activity: [2 weeks, 5 days ago](https://wordpress.org/support/topic/feature-request-line-count/#post-19017953)
 * Status: resolved