Reducing WordPress Comment Spam

Self-hosted WordPress sites often attract a lot of comment spam which requires your valuable time or resources to reduce to more manageable levels.

  • We recommend automatically turning off commenting on older posts, because these are the posts that often rank very well in Google which attracts the spammers in the first place. Most blogs choose to turn commenting off on posts that are three months old or older. (We usually do six months.)By turning off commenting on older posts, our spam dropped approximately 25% and it didn’t cause our WordPress site to load any slower.
  • Akismetis possibly the most effective method of reducing spam through a WordPress Plugin. Akismet works by connecting to a hosted web service to determine if comments or pingbacks are spam or legitimate.By using Akismet, we reduced the amount of comment spam by nearly 100%, but Akismet unfortunately isn’t free any more for business users.
  • Disqus is an amazing WordPress Plugin that is used for commenting. Disqus uses a hosted web service to moderate comments and automatically connects to an extensive blacklist and whitelist to reduce the amount of spam comments automatically.
  • Bad Behavior is one other WordPress plugin we use to reduce spam by not allowing the spammers to access our site in the first place. Bad Behavior works by analyzing the way the browser/program/user is using the blog and blocking them, and of course Bad Behavior also has an extensive database of common spammer Ip addresses that it also uses to block.

What is your preferred method for reducing comment spam? We believe that there’s no one technique that will completely eliminate spam, but these techniques together will help you better use your resources.

SSRS – Useful Header / Footer Expressions

SQL Server Reporting Services is an excellent tool for controlling the output of reports and having reports created dynamically and even emailed to users. On all reports, I generally try to add a header and footer that will allow the users to quickly see the details of the report.

Generally, it’s a great idea to include the parameters used to generate the report especially if there’s several options that could produce dramatically different results.

Header
I always like to include all of the parameters used to generate the report in the header and include the name of the report as well. In most cases, the reports I create are exported to PDF and sometimes printed for management or sometimes emailed to clients.

And of course, it’s always a great idea to add some branding to the header like including your company’s tag line and logo.

Footer
I always include the creation time of the report, along with the page number and total number of pages in the footer of the report.

Akismet (Anti-Spam)

Akismet has worked extremely well for me over the last two years, it’s only inaccurately identified two comments as spam out of almost 20,000 comments. Akismet is pretty much the only plugin used on every WordPress blog, and works for almost everyone although it is no longer free for business use.

There’s been reports over the last year or so of comments missing for some people, but I haven’t ever experienced this or heard from anyone I know of comments disappearing.

Although, extremely good Akismet won’t always solve all spam problems especially on sites with a lot of traffic. I usually recommend using a capatcha with Akismet.

What do you recommend or use?

Converting Access to MySQL

For a client, I took on some very old ASP code that desperately needed some TLC before the site relaunches.

While working on the project I had to convert an old Access 2000 file to a MySQL database. I found a free exe that met all of my needs for the conversion and safely moved all of the data: http://www.bullzip.com/products/a2m/info.php

Access to MySQL uses a wizard like interface to allow just about anyone to safely do the conversion. Only problem I had was that I didn’t have the ODBC driver it liked, otherwise it worked very well and was pretty quick.

Zen Coding

When I first heard of Zen Coding on Sitepoint, I figured it was some other gimmick that might save me about 0.01% of my time each year after I spend five or six hours learning the syntax.

Zen Coding works by expanding some abbreviations into properly closed html. The syntax is very simple, and can be easily explained in just a few examples. The syntax is basically CSS selectors which most web designers / web developers should already know.

Overall, I found installing and using Zen Coding to be very worthwhile. I just made sure to change the shortcut key in Notepad++ because Ctrl + E wasn’t doing it for me. :)

Ports exist for a lot of different editors, and IDEs, so check it out. What other productivity tools do you use?

Resource interpreted as other but transferred with MIME type text/javascript.

When I was looking at a site with the Chrome Developer Tools, it had a little error icon that said “Resource interpreted as other but transferred with MIME type text/javascript” when I clicked it.

I couldn’t figure out my error at first, but eventually realized I had for some reason had a script tag with a src assigned of blank and then had javascript between the source tags.


<script type="text/javascript">doSomething();</script>

A blank url or src is of course a reference to the current page. I don’t know why it took me so long to figure that out, but once I changed the page I realized the error.

Hope this helps!

Clean Code – Are Comments Required?

On LinkedIn, I noticed a question that didn’t really have any answers or additional comments. “If I write clean code, do I need comments?” was asked by the user on the discussion board.

In an ideal world, there would be no need for comments because the code would be expressive enough that any programmer could easily grasp the concept. Comments should only be used when we are unable to clean the code more, and have it more expressive as Uncle Bob would say.

Comments should only be used to signify code, functionality, libraries, etc that aren’t clear or perhaps ToDo if your IDE supports them. Often code evolves, gets deleted, added to or whatever, but the comments are left in neglect and often end up very wrong about what the code is doing. In Clean Code, Uncle Bob describes this problem in a few words: “The older a comment is, and the farther away it is from the code it describes,the more likely it is to be just plain wrong.”

In an ideal world, you wouldn’t need to write comments, but we don’t live in an ideal world.I think that you still do need some comments, but that the number and frequency of comments should significantly decrease. Comments are a necessary evil sometimes, especially around exception handling or something that isn’t very easy to make clear. Always remember, that we need to be disciplined in updating comments as we modify the code surrounding the comments.

Why I Recommend PayPal

I spend a significant amount of my timing deal with ecommerce and different shopping systems. One of my all time favourite solutions is using PayPal and Magento together because they have been designed from the ground up to interact well together.

International Acceptance
PayPal is accepted in many countries and is capable of doing automatic currency conversion.

Integration
PayPal is very easily integrated in all open source shopping carts, and is often freely available requiring very little work for developers.

No Monthly Fees
Many of the other merchant systems require monthly payments even when your business is closed. PayPal charges a per transaction fee which all of the merchants also charge! If you’re accepting debit the transaction fee could be fairly expensive, but usually it is much cheaper for credit card transactions.

Lots of Payment Options
PayPal does e-checks, American Express, Visa, MasterCard, and Discover. PayPal is expected to release applications for smartphones, and the iPad very soon which will allow you to use your device as a wireless terminal.

Secure
You won’t need to spend time worrying about PCI compliance, because the credit card transaction is actually stored and processed on PayPal’s end. Money is usually transferred immediately for credit card transactions.

There are some other shopping solutions available, but don’t expect them to work as well or be as affordable PayPal.

Hope this helps!

SQL Server – Get Only the Date

Very often, I need the date of some data and do not like to convert the date to a varchar and then proceed to format it or convert it back to a date.

One of the official Microsoft sanctioned ways is:
SELECT DATEADD(dd,0,DATEDIFF(dd,0,GETDATE()))

WAMP Server Not Accessible on Port 80

WAMP Server generally runs fine without any problems, although sometimes we have to make some configuration changes because of other software monitoring ports. Skype, for example, is commonly using port 80 to communicate and stopping apache from responding.

If you’re using WAMP and apache at the same time, you need to left click the WAMP Manager icon in the system tray and go to apache -> httpd.conf and look for a line that says: Listen 80 to instead use a different port like: Listen 8080.

Hope this helps!

Slider by webdesign