If soap has high alkali content, it irritates skin. How can the amount of excess alkali be determined?

If soap has high alkali content, it irritates skin. How can the amount of excess alkali be determined? What can be the source of excess alkali?

Acid-base titration, i.e. titrating a soap solution with standard HCl using a phenolphthalein as indicator, can be used to determine the excess amount of alkali in soap. The excess alkali left after hydrolysis of oil can be the source of alkalinity in soap.