WfMsg statistics

These statistics show the uses of the wfMsg* functions in the code. It could be used to detect unused wfMsg functions or for transition to other syntaxes (like a transition to wfMessage as it seems there is (I don’t follow exactly the evolution of MW)). The raw data are created with.

Some statistics
Based on rev. 97412.

Explicit keys

 * 1659 calls with an explicit key
 * 362 calls with a variable as message key

Other calls have a variable in the $key parameters, which makes difficult to extract the message keys

It seems to be coherent with the number of messages (2648) since many messages are displayed from variables (whose probably the more important user is the exif-* messages)

Repartition throw wfMsg functions

 * 810 wfMsg
 * 357 wfMsgExt
 * 270 wfMsgHtml
 * 130 wfMsgForContent
 * 145 wfMessage
 * 134 addWikiMsg
 * 79 wrapWikiMsg
 * 43 wfMsgNoTrans
 * 13 wfMsgReplaceArgs
 * 12 wfMessageFallback
 * 9 wfMsgReal
 * 5 wfMsgForContentNoTrans
 * 4 wfMsgGetKey
 * 4 addWikiMsgArray
 * 5 wfEmptyMsg
 * 1 wfMsgWikiHtml
 * Total 2021

This repartition includes the definition of the functions in includes/GlobalFunctions.php and include/OutputPage.php and system calls in these files (30 occurences), which reduces the total to (probably) 1991 uses.

Usage of a same message in different places
Given the message keys explicitely names in the code, we get these statistics:
 * Range: 1 to 19
 * Occurences: 1 time: 972, 2 times: 173, 3 times: 40, 4 times: 11, 5 times: 11, 6 times: 1, 7 times: 2, 10 times: 3, 12 times: 2, 13 times: 1, 16 times: 1, 19 times: 1
 * Mean: 1.3620689655
 * Standart deviation: 1.189977174
 * Median: 1
 * Widely used (≥10):
 * colon-separator (19)
 * diff (16)
 * allpagessubmit (13)
 * rev-deleted-user (12)
 * parentheses (12)
 * namespace (10)
 * nbytes (10)
 * pipe-separator (10)

Raw data
Based on rev. 97412.