A Python script that visits a URL and assesses the website against Jakob Nielsen's 10 Usability Heuristics. Uses cloudscraper to bypass Cloudflare anti-bot protection, making it suitable for sites protected by Cloudflare.
- Python 3.10+
- cloudscraper
- beautifulsoup4
pip install -r requirements.txtpython assess_usability.py https://example.com| Option | Description | Default |
|---|---|---|
url |
URL to assess (required) | — |
--timeout |
Request timeout in seconds | 30 |
--max-links, -n |
Maximum number of linked pages to follow and assess | 0 (initial page only) |
--all-domains |
Follow links to other domains; default is same-domain only | same-domain only |
Custom timeout:
python assess_usability.py https://example.com --timeout 60Assess the initial page plus up to 5 linked pages (same domain):
python assess_usability.py https://example.com --max-links 5Assess up to 10 links including external domains:
python assess_usability.py https://example.com -n 10 --all-domainsThe script prints a report to stdout:
- Summary: Count of Pass / Warn / Fail across all 10 heuristics
- Per heuristic: Name, status, findings, and suggestions
This is an automated, pattern-based assessment. Heuristic evaluation is traditionally a human-driven activity. Some heuristics (e.g., "Match Between System and Real World") require semantic judgment that cannot be fully automated. The script provides useful automated checks that correlate with each heuristic, serving as a starting point for human review.