How to find all macOS applications which are not from the App Store?
The screenshot below shows how to use a Finder search query to find all applications that are not from the App Store. The “Raw Query” condition is kMDItemAppStoreHasReceipt != 1. This is the same, I think, as testing for a directory named “_MASReceipt” as in the answer by patrix. But using a Finder search query should be easier for people not comfortable with using Terminal.