Length
The length can be measured with the subject standing and the penis held parallel to the floor. The penis is measured along the top, from the base to the tip. Results are inaccurate if the measurement is taken along the underside of the penis, or if the subject is seated or prone.[2]
I'm still not sure if this is supposed to be erect or flaccid. The "Girth" subsection clearly states that it needs to be erect, but it's notably missing from here. In the "Problems" section the article says that "a penis must be completely erect in order to obtain an accurate measurement," but then it goes on to describe different measurements made by "measur[ing] the penis by stretching the flaccid penis as far as comfortably possible." Apparently the average length seems to be between 5 and 6 inches. I'm finding it a bit hard to believe that's an erect measurement.
There's a section further down specifically about the studies. It indicates that it is an erect measurement. Even further down, they mention a particular study finding that the average flaccid length is 3.9". 8" is an average erect porn dick, according to one of the sources listed at the end of the wiki article.
They mention even later in the article that the most sensitive length of a female's genitalia is ~4" in length. Therefore, the median penis should be able to stimulate the most sensitive region of the female genitalia.
I think it absolutely makes sense that the average penis would be 5.1-5.9", since I don't there really is an evolutionary advantage to having a giant dick. I would actually bet on it being at the low end of the range, given that the studies they list that seem to have the smallest bias in sample or reporting are on the low end of the range.