Limit Comments and Word Count

Description

This plugin adds above the comment box an active letter counter, word counter, and comment counter, that provides a user constant visual access to their input activity. Any comment that exceeds the word limit will result in a red change it count as the user tries to type more words. If the users tries to post anyway, a warning dialogue will appear below the comment box that will state the limit and the comment will not post. Once the user edits the words that exceeds the limit, the comment can be posted. User types are defined when the rule is created, isolating what user type is restricted by a given rule. Multiple rule types can be created if different rules are required.

The plugin never places a restriction or limits on the WordPress default user types Administrator, Editor, Author and Contributor. If the blog administrator would create a rule for any of the three roles seperately (Editor, Author and Contributor), then that rule would supersede the default setting. Other users types that may be seen in the user’s type dropdown are not default to WordPress and would require a rule created if limits are required.

This plugin also combines the ability to limit the number of comments allowed by the blog administrator. The defined limit is contained to each day, each week or each month. Once the limit is reached by definition of the time span selected, an alert message displays the reason for not allowing further comments.

The plugin settings allows you to disable the flood protection notice provided default in WordPress, where a user is normally blocked from quick successive posts resulting in a bleak 404 error. Along with this, a user is by default blocked from pasting the same commment, letter for letter, under any post. This can too can be disabled.

The latest addition includes the ability to activate a Comment Rules pop-up modal within the post. It can be deactivated in the settings but is active by default. It appears top left above the post’s comment box. You may create the rules to read any way you wish in settings, but keep the text rules short as the sample text or they will wrap and malform the windows appearance.

The plugin as a whole is very simple and uses nearly no system resources and is compatible with all tested blog add-ons loaded to the initial staging site. This includes membership platforms like Magic Members, MemberPress, Memberships Pro, Restrict Content Pro, LearnDash, S2Member and WooCommerce Memberships. Additionally, the plugin works in combination with any other WordPress module that requires a user to register before commenting. To clarify, for the plugin to work, a user must be a registered and active for the plugin to track activity. Logically, no plugin can monitor or limit unregistered anonymous comments. Guests cannot be controlled by the plugin limits, only registered users.

Notes: This plugin will not work with wpDiscuz where it uses its own hook and templates. If the limit is set to two comments in 24 hours for example, but one was deleted by the moderator, the subscribers comments will now show another comment remains. Previously, any comments in the trash within the limited time was counted against the subscriber. The plugin’s language support includes: English, Spanish and French.

Using in Multisite Installation

  1. Extract the zip file contents in the wp-content/mu-plugins/ directory of your WordPress installation. (This is not created by default. You must create it in the wp-content folder.) The ‘mu’ does not stand for multi-user like it did for WPMU, it stands for ‘must-use’ as any code placed in that folder will run without needing to be activated.
  2. Access the Plugins settings panel named ‘Limit Comments and Word Count’ under options.
  3. Configure your settings with two different error messages and save settings.

Technical Details for Release 1.1.1

Load time: 0.514 s; Memory usage: 2.62 MiB
PHP up to tested version: 7.4.8
MySQL up to tested version: 8.0.21
cURL up to tested version: 7.72.0, OpenSSL/1.1.1h

Screenshots

  • Create or edit limit rule settings page with sample content
  • Add optional Comment Rules modal above comment box for users
  • Word count exceeded warning dialogue example
  • Comment count exceeded sample screen capture

Installation

  1. Upload the plugin files to the ‘/wp-content/plugins/plugin-name’ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings -> Limit Comments and Word Count setup page to configure the plugin
  4. Configure your settings with two different error messages and save settings.

FAQ

Is this plugin frequently updated to WordPress compliance?

Yes, attention is given on a staged installation with many other plugins via debug mode.

Is the plugin as simple to use as it looks?

Yes. No other plugin exists that addresses both comments and word limits so simply.

Has there ever any compatibility issues?

There were conflicts with PHP 7.2 that has since been resolved.

Is the code in the plugin proven stable?

Please click the following link to check the current stability of this plugin:
https://plugintests.com/plugins/limit-comments-and-word-count/latest

Reviews

October 14, 2020
... the plugin had a nag notice up pestering me for one, so I have to call it as I see it. The first thing is that I agree with the review by dannydanny; this doesn't seem to give you the ability to limit posts by people who aren't members. But that aside, the description of the Plugin was: "This plugin adds above the comment box an active letter counter, word counter, and comment counter, that provides a user constant visual access to their input activity". I did not see ANY of those. (5.5.1–en_AU, Twenty Seventeen theme.) But what I DID see when the plugin was enabled was that the [Post Comment] control had completely vanished from the page. I'm guessing that it can still be seen by bots since the endless Russian spam postings have continued unabated, it was only humans who did not have access to the button. As soon as I disabled the plugin, the button came back. As soon as I reenabled the plugin, and refreshed the page, it vanished again. (I had windows open in Firefox, Chrome and Edge to check that this wasn't a browser issue.) With the plug-in active, I couldn't even see the button when I was logged on as an Admin. I have to again agree with dannydanny; if I give someone an account then it implies that I trust them to not abuse the privilege. THEY aren't the people that I need to put limits on, and as far as I can see the plugin doesn't give you the option of limiting non-members. That being the case, I would not have a need for this plugin, and will be uninstalling it once I post this. I didn't rate it as 1 star out of malice, but the tool tip over 2 stars says "Works"... and if the [Post Comment] button isn't even visible to an admin it's really hard to say "it works". Yes, it stops comments... but in my experience it stops ALL comments that aren't done by spam bots, since the commenter has no way of posting the comment.
May 28, 2020
This plugin is great, but seems to lack the ability to limit comments for folks who are not registered users. For example, if someone comes along that is not a user of my site and wants to add a comment, I can't limit those. And those are the most important to limit. Maybe I'm misunderstanding the plugin. Also, once you create a limit or a rule, the rules do not show so how can you possibly remember what you've done? It just says, "settings saved." But it does not show that you have created a rule. So there is no way to see what rules you've imposed upon each user type.
March 12, 2020
This plugin is great at limiting comments on my blog; easy to setup!
February 20, 2020
This Plugin help me a lot for my website
January 8, 2020
Plugin is simple, yet extremely effective on providing controls to limit comments: you can limit by time period, by role, number of comments per time period, and more. And support is there to help if you have any questions or concerns. Thanks for the plugin!
July 26, 2018
Not heavy and at the same time has all the functions that I need. It helps me so much.
Read all 7 reviews

Contributors & Developers

“Limit Comments and Word Count” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.1.1 09/24/20
– Modify readme.txt with description updates
– Update: Make compatible with WordPress 5.5.1.

1.1.0 06/19/20
– New: Add modal to provide optional blog comments rules.
– New: Add Spanish and French languages.
– Update: User comments in trash do not count against limit.
– Update: CSS for modal and plugin warning dialogues.
– Update: Make compatible with WordPress 5.4.2.

1.0.7 01/07/20
– New: Add settings to disable flood protection notice.
– New: Add settings to allow user to add duplicate comments.
– Update: Make compatible with WordPress 5.3.2.

1.0.6 11/21/19
– Fixed: PHP line 854 error and custom roles.
– Update: Make compatible with WordPress 5.3.
– Update: Make compatible with MemberPress 1.7.2.
– Bug fix on selected user role when editing
– Highlight word limit count when reached and exhausted

1.0.5 12/16/18
– Update: Make compatible with WordPress 5.0.1.

1.0.4 08/04/18
– Fixed: Rating reminder would not disable properly.
– Update: Make compatible with WordPress 4.9.8.

1.0.3 07/25/18
– Fixed: Style error conflicting with blog formatting.

1.0.2 07/20/18
– Fixed: Comments limit not updating after full cycle.

1.0.1 07/19/18
– New: Administrator reminder to rate after 15 days
– Improvement: Enlarge alert message fields width
– Update: Emphasize plugin works with registered users only
– Fixed: Users waiting 24 hrs after each comment

1.0.0 07/03/18
– Initial release