diff --git a/lib/metadata/policies.js b/lib/metadata/policies.js index c01566d..1f8a6fb 100644 --- a/lib/metadata/policies.js +++ b/lib/metadata/policies.js @@ -367,6 +367,30 @@ var policies = { "isBadThreshold": 20, "isAbnormalThreshold": 40 }, + "smallJsFiles": { + "tool": "phantomas", + "label": "Small JS files", + "message": "

Number of JS assets smaller than 2 KB that could probably be inlined or merged.

", + "isOkThreshold": 2, + "isBadThreshold": 10, + "isAbnormalThreshold": 16 + }, + "smallCssFiles": { + "tool": "phantomas", + "label": "Small CSS files", + "message": "

Number of CSS assets smaller than 2 KB that could probably be inlined or merged.

", + "isOkThreshold": 0, + "isBadThreshold": 8, + "isAbnormalThreshold": 12 + }, + "smallImages": { + "tool": "phantomas", + "label": "Small images", + "message": "

Images smaller than 2 KB that could be base64 encoded or merged into a sprite.

", + "isOkThreshold": 2, + "isBadThreshold": 17, + "isAbnormalThreshold": 30 + }, "notFound": { "tool": "phantomas", "label": "404 not found", diff --git a/lib/metadata/scoreProfileGeneric.json b/lib/metadata/scoreProfileGeneric.json index d104e51..55c2b9d 100644 --- a/lib/metadata/scoreProfileGeneric.json +++ b/lib/metadata/scoreProfileGeneric.json @@ -80,6 +80,14 @@ "otherCount": 0 } }, + "smallRequests": { + "label": "Small requests", + "policies": { + "smallJsFiles": 1, + "smallCssFiles": 1, + "smallImages": 1 + } + }, "network": { "label": "Network", "policies": { @@ -101,6 +109,7 @@ "cssComplexity": 1, "badCSS": 1, "requests": 3, + "smallRequests": 1, "network": 2 } } \ No newline at end of file