I kept getting asked by people if I could modify the code so that it would tag custom post types.
Therefore I just removed any WHERE clauses in SQL that was saying WHERE posttype='post' to post_type NOT IN('page', 'attachment', 'revision')
Therefore it now handles custom post types.
You can change it back by just changing the SQL back to the old way of doing things if you want.
If I was getting any money out of doing any of this I would spend more time making it more customisable etc but I don't so you will need to hack it about to meet your open source needs.
Here are the two ways
// old way
$sql = "SELECT id
FROM {$wpdb->posts}
WHERE post_password='' AND post_status='publish' AND post_type = 'post'
ORDER BY post_modified_gmt DESC;";
// handle custom post types by allowing everything that isn't a page, attachment or revision
$sql = "SELECT id
FROM {$wpdb->posts}
WHERE post_password='' AND post_status='publish' AND post_type NOT IN('page', 'attachment', 'revision')
ORDER BY post_modified_gmt DESC;";