EnsureScriptFunc()
shouldn't be necessary if this is a user interaction...thus all async scripts will most likely have loaded by the time a user clicks .. no need to check if reputation.js has loaded
If you need the check either replace it with a plain vanilla JavaScript check to check for the Globals reputation.js adds
Or make sure to load scripts the SP.SOD (Script On Demand) SharePoint way:
https://www.eliostruyf.com/correctly-including-scripts-display-templates/
https://msdn.microsoft.com/en-us/library/office/ff410742(v=office.14).aspx
#Update: Microsoft.Office.Server.Reputation
Update: Microsoft.Office.Server.Reputation
If you display a View with List set to do star-ratings,
then do a CTRL-SHFT-F search in the Console
This namespace comes from a different JS file:
(maybe it was reputation.js
in SP2013 as all the blogs state)