JS compression ratio in Advagg module I am trying to use AdvAgg in my Drupal 7 site. I am using a local server for running tests.

The issue is that the module doesn't compress (php-jsmin) all the JavaScript files, which is causing a bad score in page speed insights. 

After some debugging, I found out the problem: The uncompressed file didn't have a compress ratio between 0.1 and 0.9 so it was being aggregated as it was.

I'm talking exactly about advagg_js_compress.module file, lines below 143:

// Set to "-2" if compression ratio sucks (it's already compressed)


Why is necessary a min ratio? Could set min ratio to 0 so that all JavaScript files are processed?
Sometimes things compress too well; ie empty string. Sometimes things don't compress at all; ie already compressed. In both cases I opt to use the original file since minification of already minified js can sometimes cause js errors. You can variable set it if you want to adjust the min/max cutoff.