Newsletter plugin for WordPress

Not new to WordPress, but to be precise this is my 1st plugin for public release. Wrote themes and worked on WordPress quite closely. Some of the themes i published for public consumption. There are many newsletter plugins around so what’s new in this. Good question, well there might not be some thing very new but there are some things which make me to wrote this simple plugin. It is a simple plugin with Admin option page to download the user data in csv format for selected dates. I was not after many options, i wanted a simple plug which just work the way i want it and this is why i wrote this plug from scratch. Want to read more details, no worries read them here. Installation and usage is written there in details too. Tested with WP 3.5, but should work with 3.0+ versions.

Enough of reading, lets see it in action. Sorry there is no live demo at the moment but these screen shots will do the justice.

In-action-in-theme

In action

In-action-in-wp-admin

Admin options page

Time to download and install it, head over to githug and download or pull the files. Got issues or need help, there is an issue page on github for it post it over there.

The directory name should be mma-newsletter. Remove other words, hyphens etc after extracting.

Download it from github

Thanks for using it. 🙂

How to reduce spam comments on WordPress blog

Are you a blogger? and using WordPress, then you might be aware of the spam flood which is very common on every blog now a days. Just what we need to do is a little more tweaking to stop these useless comments. In WordPress there are many ways to stop such type of comments.

I will give some tips before discussing the real issue and its prevention.

  • Always use captcha software with your comment form.
  • Disable comments on your old blog posts, this can be automatically done through WordPress Admin section. Settings -> Discussion , you can change the days here  ‘Automatically close comments on articles older than yy days’. yy = number of days.
  • Do not automatically approve comments for new users. Check Settings -> Discussion -> Before a comment appears, you can choose settings there.
  • Mark all the spam comments as Spam in Comments section.
  • Settings -> Discussion, you can set all the necessary options there to prevent spam.

Ok, that were some tips to make the things little under control. Now lets discuss how to prevent these spams in detail.

Every theme i guess have functions.php file where every necessary function is located and called by the theme for use. Go to your theme directory and check the theme you are using either it have it or not. If not, create one on your local pc and put the following PHP code in it.

[cc lang=”php” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”10″ tab_size=”4″]
<?php
function verify_comment_spam_flood_referrer() {
if (!wp_get_referer()) {
wp_die( __(‘You cannot post comment at this time, may be you are spamming our blog!.’) );
}
}
add_action(‘check_comment_flood’, ‘verify_comment_spam_flood_referrer’);
?>[/cc]

The above function checks the ‘referring source’ of the page on which the comment is posted. If it is found empty, in most of the cases it will be stopped from posting a comment. Now upload this file to your theme directory through FTP/SSH.

Recommended Plugins:

1- Akismet Plugin

Akismet plugin is available from the WordPress admin section to install. You will need api key to activate this plugin. I personally don’t use it because of its spam filter, some time it will catch the real comments and which of course no one wants.

2- Ban Spam IP Addresses

Another plugin to filter spam by IPs. Wp-Ban is useful in many ways and not in many also. You can blacklist IPs and by doing that, that IPs will not be able to post any comments in future on your blog posts. You can filter spam IPs from the comments and blacklist it, add it to Wp-Ban.

But this plugin has this drawback(i would say, as nothing is perfect), if you blacklist an IP, a visitor from the same host name would not be able to view your blog. Use this plugin with very care. Blacklist the IPs, which post vulgar comments frequently.

3- Use of Good Captcha Plugin

Recaptcha from Google can be considered in this case.

SI CAPTCHA Anti-Spam is another good captcha plugin.

4- Switch to third Party Comment Systems

The most used comment system i saw is Disqus , IntenseDebate can also be considered.

Ok, now what i use and recommend. I use the above PHP code in my functions.php file and SI Captcha. Before using the function, i received a lot of spam comments, which make it hard for me to look for the real comments and delete the rest. But now, the spam ratio dropped to almost .01%, a great success i would say. Hope, it would help you to at least reduce the spam rate.

Good luck!