would be nice to have the parameters for spam detection in the config files available, so it is easy to customize, without touching the code..
Possible config keys:
- min strlen of "good text" (see $score = strlen($text) > 50 ? 0 : 2;)
- max score (see if ($score >= 20))
- weight for a bad word (see $score += 2 * preg_match_all('/'.$word.'/', $text, $result);)
- score multiplier (see return $score * 5;) - Maybe this number have to be calculated because it depends on the max score setting
- protocolls which are used for validation (see $score += preg_match_all('/http[s]?:\/\//', $text, $result);)