Extension:SmiteSpam

MediaWiki extensions manual
SmiteSpam
Release status: stable
Implementation Special page , API
Description Provides a special page helping administrators identify and delete spam
Author(s) Vivek Ghaisas (Polybuildrtalk)
Latest version 0.5 (January 2024)
MediaWiki 1.36+
Database changes Yes
Tables smitespam_trusted_user
License GNU General Public License 2.0
Download
  • $wgSmiteSpamThreshold
  • $wgSmiteSpamCheckers
  • $wgSmiteSpamIgnoreSmallPages
  • $wgSmiteSpamQueryPageSize
  • $wgSmiteSpamIgnorePagesWithNoExternalLinks
  • $wgSmiteSpamDisplayPageSize
  • smitespam
Quarterly downloads 9 (Ranked 128th)
Translate the SmiteSpam extension
Issues Open tasks · Report a bug

The SmiteSpam extension provides a special page "Special:SmiteSpam" helping administrators identify and delete spam pages.

Usage

edit

Navigate to "Special:SmiteSpam" in order to run the analyzer and get a list of pages that the extension identifies as spam. You can use the interface to block users, delete pages created by them or trust a user you know to be good contributors.

The list of trusted users can be viewed and edited at "Special:SmiteSpamTrustedUsers".

Download

edit

You can download the SmiteSpam code, in .zip format, here:

https://github.com/wikimedia/mediawiki-extensions-SmiteSpam/archive/0.5.zip

You can also download the code directly via Git from the MediaWiki source code repository (see available tags). From a command line, you can call the following:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SmiteSpam

To view the code online, including version history for each file, go here.

Installation

edit

To install the extension, place the entire 'SmiteSpam' directory within your MediaWiki 'extensions' directory, then add the following line to your 'LocalSettings.php' file:

wfLoadExtension( 'SmiteSpam' );

Once you have the code set up, SmiteSpam has a database table, "smitespam_trusted_user", that must be created. You will need to create it by going to MediaWiki's /maintenance directory and calling the following:

php update.php

Configuration

edit

User right

edit

By default, this extension can only be used by sysops. You can change it: e.g. let also bureaucrats use it by adding the following line to your "LocalSettings.php" file.

$wgGroupPermissions['bureaucrat']['smitespam'] = true;

Parameters

edit
Parameter Default Value Comment
$wgSmiteSpamThreshold 0.7 Pages analyzed as having a spam "probability" higher than this will be shown on special page.
$wgSmiteSpamIgnoreSmallPages true Should SmiteSpam ignore pages smaller than 500 characters?
$wgSmiteSpamIgnorePagesWithNoExternalLinks true Should SmiteSpam ignore all pages that don't have any external links outside of template calls?
$wgSmiteSpamQueryPageSize 500 Number of pages to analyze in one AJAX request. (Setting this too high can cause timeouts.)
$wgSmiteSpamDisplayPageSize 250 Number of pages to display in one paginated page.

$wgSmiteSpamCheckers is a parameter that lets you choose which "checkers" you want to run and how much weight (value) you want to give to each of their reports.

By default, this is set to:

$wgSmiteSpamCheckers = [
	'ExternalLinks' => 1,
	'RepeatedExternalLinks' => 1,
	'Wikitext' => 1,
];

Checkers

edit
ExternalLinks

Checks how much of the text (ratio) is external links.

RepeatedExternalLinks

Checks whether there are repeated external links.

Wikitext

Checks how much wikitext is there in the contents of the page.

Version history

edit

The version history for this extension is:

  • 0.1 - September 6, 2015 - Initial version
  • 0.2 - March 14, 2020 - extension.json added; support removed for MW < 1.29; submit button added to bottom of form in Special:SmiteSpam; fixed select all/none to also account for pages created by blocked users; added special page links to Extension:AdminLinks interface; files rearranged
  • 0.3 - April 20, 2020 - Renamed $wgQueryPageSize and $wgDisplayPageSize variables to $wgSmiteSpamQueryPageSize and $wgSmiteSpamDisplayPageSize, respectively; more file rearranging
  • 0.4 - August 3, 2022 - Removed SmiteSpam.php; support removed for MW < 1.35; support added for MW >= 1.37
  • 0.5 - January 31, 2024 - Support removed for MW < 1.36; deprecated functions replaced

Screenshots

edit

Special:SmiteSpam

edit
 
An example of a SmiteSpam page that a user may be first greeted with.

Special:SmiteSpamTrustedUsers

edit
 
An example of a SmiteSpam Trusted Users page.