I'm not too sure of the point "Speedy" and "FrenchCAD" are trying to make. Work is performed against gravity, which acts as a restoring force, hence vibratory motion of the pendulum.
Infact, "jbknudsen" correctly points to the algebaic set of equations governed by the energy method. Note "g" for the acceleration due to gravity, acceleration of the pendulum mass, hence force which is performed only in the vertical direction, i.e. against gravity. Much like ballistic motion, neglecting air resistance implies no horizontal force, work is strictly vertical since the mass rises and falls against gravity.
I prefer the differential equations in the derivation since they correctly lead into Elliptic Integrals of the Second Kind, our situation if angle of depression is greater than, say ten (10) degrees. The energy method discussed considers only linear approximations to the sine wave in the degenerative case. This may be well beyond the scope of discussion however.
Kenneth J Hueston, PEng
Principal
Sturni-Hueston Engineering Inc
Edmonton, Alberta Canada