One of the shortcomings of the Zsh shell, even if using extended globbing, is that it will recursively drill into every subfolder, even when those subfolders are package folders of applications, libraries, and other package bundles. This encroachment will add false extensions and sums to your results depending upon what the script encounters on its pursuit of folder contents.
As a mental exercise, I wrote a Swift language replacement for the Zsh script that obeys restrictions on entering package folders, and its recursion extension summary is shorter and more accurate for this reason. The Swift solution isn't quite done because it needs to present its results in a scrollable window, and needs to be able to accept a command-line path to the searchable folder location — in addition to its current launching a file chooser when no arguments are offered.
I probably could have written this in AppleScript/Objective-C with no small interference from AppleScript in the process. Since Apple does not bundle a Swift compiler and libraries with the operating system, one would need to install the current command-line tools for Xcode (~3.5 GB) in order to compile the Swift source.
If you want the Swift source code when I am done, ask for it here, and I will post it with instructions.
