{"id":13447194,"url":"https://github.com/treosh/exthouse","last_synced_at":"2025-04-05T17:02:57.194Z","repository":{"id":34943251,"uuid":"160161093","full_name":"treosh/exthouse","owner":"treosh","description":"Analyze the impact of a browser extension on web performance.","archived":false,"fork":false,"pushed_at":"2022-05-28T19:17:22.000Z","size":100003,"stargazers_count":406,"open_issues_count":8,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-17T04:29:29.282Z","etag":null,"topics":["hacktoberfest","lighthouse","performance-analysis","web-extensions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-03T08:56:44.000Z","updated_at":"2024-01-04T16:28:38.000Z","dependencies_parsed_at":"2022-08-28T08:01:38.241Z","dependency_job_id":null,"html_url":"https://github.com/treosh/exthouse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treosh%2Fexthouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treosh%2Fexthouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treosh%2Fexthouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treosh%2Fexthouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treosh","download_url":"https://codeload.github.com/treosh/exthouse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369951,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","lighthouse","performance-analysis","web-extensions"],"created_at":"2024-07-31T05:01:10.635Z","updated_at":"2025-04-05T17:02:57.165Z","avatar_url":"https://github.com/treosh.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\n    Exthouse\n  \u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Analyze the impact of a browser extension on web performance.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/158189/59514028-5904e680-8ebc-11e9-9e3f-bb6c9f8b464e.png\" width=\"1202\" alt=\"Screenshot of Grammarly extension performance report generated by Exthouse\"\u003e\n\u003c/p\u003e\n\n## Motivation\n\nWhen measuring real user performance engineers take to the account factors like device and network conditions.\nBut there is one more factor, that is not in direct control - web extensions. They add additional scripts, DOM manipulations, and impact the user experience.\n\nExthouse is a tool powered by [Lighthouse](https://github.com/GoogleChrome/lighthouse) that provides a report about web extension impact on web performance.\nIt measures an extension performance score that helps developers to improve the performance of their extensions and web in general.\n\n**Goals:**\n\n1. Highlight one more performance factor affecting web performance.\n2. Identify web extensions that harm web performance.\n3. Provide developers with reports they can use to improve performance.\n4. Show that desktop users may experience unexpected performance issues related to web extensions.\n5. Try to figure out the way to notify users about a negative impact of the installing extension, at best at Chrome Web Store level.\n\n## Methodology\n\nExthouse performs several steps to do analysis:\n\n1. Launches a browser without extension to evaluate the default performance and store results `./exthouse/result-default-1.json`\n1. Launch a browser with installed extension using Puppeteer and stores results to `./exthouse/MY_EXTENTION-1.json`\n1. Extends Lighthouse performance categories with additional audits to estimate the impact of the extension:\n\n   - `exthouse-new-long-tasks` - The value represents a sum of Long Tasks. [Long Tasks](https://developer.mozilla.org/en-US/docs/Web/API/Long_Tasks_API) (weight: 1).\n   - `exthouse-max-potential-fid-change` - The change for the longest task duration highlights the impact on potential First Input Delay (weight: 1).\n   - `exthouse-extension-files` - Extension files add extra CPU consumption for every URL visit. Bundle resources into one and leverage hot chaching. [Learn more](https://v8.dev/blog/code-caching-for-devs) (weight: 1).\n   - `exthouse-default-metrics` - All metrics collected from the default run (without extension) (weight: 0).\n\n1. Generates Lighthouse style report using the [Lighthouse scoring algorithm](https://github.com/GoogleChrome/lighthouse/blob/master/docs/scoring.md#how-are-the-scores-weighted).\n\nEnvironment conditions:\n\n- Browser: `Chromium`\n- Emulated form factor: `desktop`\n- CPU slowdown multiplier: `2`\n- More settings in [Lighthouse config](/src/utils/measure-chromium.js#L7).\n\nMost of the extensions add tasks to the main thread and affect interactivity metrics:\n\n- Time to Interactive (TTI) - Time to interactive is the amount of time it takes for the page to become fully interactive. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/time-to-interactive).\n- First Input Ddelay (FID) - The change for the longest task duration highlights the impact on potential First Input Delay. [Learn more](https://developers.google.com/web/updates/2018/05/first-input-delay).\n\n## Analysis of top 10 extensions from Chrome Web Store\n\nThis analysis evaluates the top 10 extensions from [Chrome Web Store](https://chrome.google.com/webstore/category/extensions) by users count. Extensions are manually filtered to exclude login requirement, not relevant extensions in categories like PLATFORM_APP, or related to specific URLs like `*://*.google.com/*`.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6231516/59853553-c6f85480-9379-11e9-9535-227166ceeaed.png\" width=\"60%\" alt=\"Performance impact of top 10 extensions from Chrome Web Store \"\u003e\n\n| Name                  | Score | Users Count | FID Δ ( ms ) | Scripting Δ ( ms ) |\n| --------------------- | ----- | ----------- | ------------ | ------------------ |\n| Grammarly for Chrome  | 50    | 10M         | 114          | 530                |\n| Adblock Plus          | 59    | 10M         | 118          | 760                |\n| Skype                 | 82    | 10M         | 150          | 120                |\n| Avira Browser Safety  | 94    | 10M         | 60           | 30                 |\n| Avast SafePrice       | 99    | 10M         | 62           | 0                  |\n| AdBlock               | 100   | 10M         | 0            | 0                  |\n| Google Translate      | 100   | 10M         | 0            | 0                  |\n| Pinterest Save Button | 100   | 10M         | 0            | 0                  |\n| Tampermonkey          | 100   | 10M         | 0            | 0                  |\n| uBlock Origin         | 100   | 10M         | 0            | 0                  |\n\n## Usage\n\nInstall CLI using `npm`:\n\n```bash\nnpm install --global exthouse\n```\n\n**`exthouse --help`**\n\n```\nUsage: exthouse [path/to/extension.crx] [options]\n\nOptions:\n  --runs \u003cnumber\u003e    amount of runs to evaluate median performance value (default: \"1\")\n  --url \u003curl\u003e        url to evaluate extension performance (default: \"https://example.com/\")\n  --format \u003cformat\u003e  output format options: [json,html] (default: \"html\")\n  --disableGather    disable gathering and use /exthouse to produce results\n  -V, --version      output the version number\n  -h, --help         output usage information\n```\n\n**CLI usage examples**\n\n```bash\n# Evaluate extensions with several runs.\n# It performs do 3 runs, get median value and generate a report.\nexthouse Grammarly-for-Chrome.crx --runs=3`\n\n# Generate a report based on existing data:\n# It reads results from `/exthouse` folder and generate report.\nexthouse Grammarly-for-Chrome.crx --disableGather\n\n# Output report in json format\nexthouse Grammarly-for-Chrome.crx --format=json`\n```\n\n**Evaluate any extension**\n\n1. Download extension using https://chrome-extension-downloader.com/\n2. Copy path to the `MY_EXTENTION.crx` and pass to cli `exthouse MY_EXTENTION.crx --runs=3`\n3. The process takes a few minutes and results are stored in the [Lighthouse](https://github.com/GoogleChrome/lighthouse) report.\n4. All debug data is stored in `exthouse` folder.\n\nFind downloaded examples [extensions](/extensions) folder.\n\n## Future Work\n\n- [ ] add support for login script to test extensions required authentication ([#22](https://github.com/treosh/exthouse/issues/22))\n- [ ] perform extensions analysis required authentication and compare score w/o authentication. [#25](https://github.com/treosh/exthouse/issues/25)\n- [ ] experiment with cache (try: warm, hot) to see how scripts are effected by v8 caching. [More about cache](https://v8.dev/blog/code-caching-for-devs).\n- [ ] experiment with results, running in Chrome and Edge. Add flag `browserBinaryPath`\n- [ ] expose node.js API ([#24](https://github.com/treosh/exthouse/issues/24))\n- [ ] experiment with Firefox add-ons (all related work is in the branch [firefox-experimental](https://github.com/treosh/exthouse/tree/firefox-experimental)).\n- [ ] make repo smaller using [bfg-repo-cleaner](https://github.com/rtyley/bfg-repo-cleaner).\n\n## Credits\n\n[This tweet](https://twitter.com/denar90_/status/1065712688037277696) has kick-started the initial research and this project.\n\nDevelopment is sponsored by [Treo.sh - Page speed monitoring made easy](https://treo.sh).\n\n[![](https://travis-ci.org/treosh/exthouse.png)](https://travis-ci.org/treosh/exthouse)\n[![](https://img.shields.io/npm/v/exthouse.svg)](https://npmjs.org/package/exthouse)\n[![](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n","funding_links":[],"categories":["JavaScript","How to use?"],"sub_categories":["Performance tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreosh%2Fexthouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreosh%2Fexthouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreosh%2Fexthouse/lists"}