in reply to Can anyone help me to improve this code, please?

You may not have the standard "find" utility available to you, but just for posterity:
find / -type f -regex '.*\.\(tmp\|bak\|\$\$\$\|chk\|old\|gid\|fts\|ftg +\|log\|dmp\|---\|prv\|temp\)$' -exec rm \{\} \;
------------ :Wq Not an editor command: Wq