npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ltd-seo-lib

v1.0.6

Published

Professional SEO, Security and Performance Analyzer Library for Node.js

Readme

Professional SEO, Security and Performance Analyzer for Node.js

npm Node TypeScript License


🚀 Quick Start

CLI (Recommended)

# Install globally
npm install -g ltd-seo-lib

# Run analysis
ltd-seo-lib https://example.com

# Or use npx
npx ltd-seo-lib https://example.com

As a Library

npm install ltd-seo-lib
import { AuditEngine } from "ltd-seo-lib"

const engine = new AuditEngine()
const report = await engine.audit("https://example.com")

console.log(`Score: ${report.overallScore}/100 (${report.grade})`)

📋 Features

🔍 SEO Analysis

  • Meta tags (title, description, keywords)
  • Heading structure (H1-H6)
  • Internal and external links
  • Image optimization (alt text)
  • Open Graph tags
  • Twitter Cards
  • Schema.org / Structured Data
  • Canonical URLs

⚡ Performance

  • Page load time
  • Page size
  • HTTP status
  • Content-Type
  • Compression

🔒 Security

  • Security headers (CSP, HSTS, X-Frame-Options)
  • Leaked credentials detection
  • Personal data verification (LGPD compliance)

🌐 Web Crawler

  • Recursive page crawling
  • Depth limit
  • Page limit
  • Same-domain filter

💻 CLI Usage

Basic Commands

# Basic scan
ltd-seo-lib https://example.com

# Limit pages
ltd-seo-lib https://example.com --max-pages 50

# Limit depth
ltd-seo-lib https://example.com --max-depth 3

# Output formats
ltd-seo-lib https://example.com --format json
ltd-seo-lib https://example.com --format markdown
ltd-seo-lib https://example.com --format html
ltd-seo-lib https://example.com --format all

# Save to file
ltd-seo-lib https://example.com --output ./report

# Skip categories
ltd-seo-lib https://example.com --no-seo
ltd-seo-lib https://example.com --no-security
ltd-seo-lib https://example.com --no-performance

Help

ltd-seo-lib --help

📖 Library Usage

Basic Analysis

import { AuditEngine } from "ltd-seo-lib"

const engine = new AuditEngine()
const report = await engine.audit("https://example.com")

console.log(report.overallScore) // 0-100
console.log(report.grade) // A+ to F
console.log(report.seoScore)
console.log(report.securityScore)
console.log(report.performanceScore)

Custom Options

const report = await engine.audit("https://example.com", {
  maxPages: 50,
  maxDepth: 3,
  checkSEO: true,
  checkSecurity: true,
  checkPerformance: true,
})

Access Detailed Data

// SEO Issues
for (const issue of report.seoIssues) {
  console.log(`[${issue.severity}] ${issue.title}`)
  console.log(issue.description)
  console.log(issue.recommendation)
}

// Security Issues
for (const issue of report.securityIssues) {
  console.log(`[${issue.severity}] ${issue.title}`)
}

// Pages crawled
for (const page of report.pages) {
  console.log(page.url)
  console.log(page.statusCode)
  console.log(page.loadTime)
}

// Recommendations
for (const rec of report.recommendations) {
  console.log(rec)
}

📊 Scores

| Score | Grade | Description | | ------ | ----- | ------------- | | 95-100 | A+ | Excellent | | 90-94 | A | Very Good | | 80-89 | B | Good | | 70-79 | C | Average | | 60-69 | D | Below Average | | 0-59 | F | Critical |

Score Calculation

  • SEO (35%): Meta tags, structure, links, images
  • Performance (35%): Load time, size, resources
  • Security (30%): Headers, credentials, personal data

🔌 Express Middleware

import express from "express"
import { auditMiddleware } from "ltd-seo-lib"

const app = express()

app.use(
  auditMiddleware({
    enabled: process.env.NODE_ENV === "production",
    reportPath: "./audit-reports",
    minScore: 70,
    alertEmail: "[email protected]",
  })
)

app.listen(3000)

📦 API Reference

AuditEngine

const engine = new AuditEngine(options?)

Methods

  • audit(url, options?) - Complete site analysis
  • auditSEOPage(url) - SEO analysis only
  • auditSecurityPage(url) - Security analysis only
  • auditPerformancePage(url) - Performance analysis only

AuditReport Interface

interface AuditReport {
  url: string
  scanDate: string
  scanDuration: number
  totalPagesCrawled: number
  totalUrls: number
  totalErrors: number
  totalWarnings: number
  totalSecurityIssues: number
  seoScore: number
  securityScore: number
  performanceScore: number
  overallScore: number
  grade: string
  seoIssues: SEOIssue[]
  securityIssues: SecurityIssue[]
  recommendations: string[]
  pages: PageReport[]
}

Options

| Option | Type | Default | Description | | ------------------ | ------- | ------- | ---------------------------- | | maxPages | number | 10 | Maximum pages to crawl | | maxDepth | number | 2 | Maximum crawl depth | | checkSEO | boolean | true | Include SEO analysis | | checkSecurity | boolean | true | Include security analysis | | checkPerformance | boolean | true | Include performance analysis |


⚠️ Troubleshooting

"Cannot find package 'ltd-seo-lib'"

Make sure to install the package locally:

npm install ltd-seo-lib

Or use npx:

npx ltd-seo-lib https://example.com

ES Module Error

If you get module errors, add "type": "module" to your package.json:

{
  "type": "module"
}

Common Issues

  1. Timeout: Increase timeout in options
  2. CORS errors: Some sites block crawlers
  3. Missing data: Some sites require JavaScript rendering

📝 Example Project

See the seo/ folder for a complete example:

cd seo
npm install
npm start

🤝 Contributing

  1. Fork the repository
  2. Create a branch (git checkout -b feat/new-feature)
  3. Commit (git commit -m 'feat: new feature')
  4. Push (git push origin feat/new-feature)
  5. Open a Pull Request

📄 License

MIT License - LTD - Laboratório de Transformação Digital


Developed with ❤️ by LTD - Laboratório de Transformação Digital

Estácio · Florianópolis, SC

npm · GitHub