Discover Browser and Plugins Versions

I have the following relevance to discover the version of a browser in mac compute. Do you have a better suggestion on how to improve this relevance?

unique values of (preceding text of first “.app” of name of it & " | " & (if exists version of it then version of it as string else “<N/A>”)) of applications whose (name of it contains “Chrome”)

Also, I would like to see a similar relevance to discover the flash version and if it is installed.