The work function is the energy an electron needs to leave the metal. Why is it called a function? Its value is different for different metals, but that doesn't make it a function; density and melting point are not called functions either. The name function seems to suggest it is a mathematical function of a variable $x$. If the work function originally is/was a function $W(x)$, then what is $x$?