Looks like the script optimizes based on current brick position. In a perfect optimizer, what it should do is look for similarities in volume of existing structures, and then compare those volumes with brick sizes multiple times til it gets multiple brick configurations. Then, it would simulate each one until it figured out which combination has the least bricks.
However, this is not an easy thing to acheive. The human brain is a complex machine, running faster and more efficiently than any computer. You guys may think that it would be easy to make a perfect optimizer, but in truth, it really isn't.
Bottom line: This is the best thing currently out there to optimize brick count. Although it has flaws, and can be improved, there is no reason to point them out and expect them to be fixed easily. Until you come up with a script that can do it better, you should stop complaining.