Kontrollerar ifall Javascript-koden är korrekt enligt Webperf-communityts egna Javascript-test. Testet är ett "lint"-test för att avgöra om det är korrekt Javascript och följer webbstandard.
Betyg: 3.10 av 5
- JS är ok.
Webbstandard
- `< script>` in: #1: Webbsida , antal grupperade fel: 1 ( 4.80 betyg )
- `< script>` in: #1: Webbsida , antal fel: 1 ( 4.80 betyg )
- Parsing error: Unexpected token : (totalt 1 st)
- `< script src="...">` in: #1: Webbsida , antal grupperade fel: 4 ( 4.20 betyg )
- `< script src="...">` in: #1: Webbsida , antal fel: 181 ( 1.00 betyg )
- X is defined but never used. (totalt 105 st)
- Unexpected console statement. (totalt 47 st)
- X is assigned a value but never used. (totalt 16 st)
- X is not defined. (totalt 13 st)
- `content-type=".*javascript.*"` in: #25: op1.js, antal grupperade fel: 1 ( 4.80 betyg )
- `content-type=".*javascript.*"` in: #25: op1.js, antal fel: 2 ( 4.60 betyg )
- Unexpected console statement. (totalt 2 st)
- `content-type=".*javascript.*"` in: #26: matomo.js, antal grupperade fel: 4 ( 4.20 betyg )
- `content-type=".*javascript.*"` in: #26: matomo.js, antal fel: 51 ( 1.00 betyg )
- X is defined but never used. (totalt 20 st)
- X is not defined. (totalt 16 st)
- Unexpected console statement. (totalt 8 st)
- X is assigned a value but never used. (totalt 7 st)
- `content-type=".*javascript.*"` in: #35: -5B...slug-5D-f, antal grupperade fel: 4 ( 4.20 betyg )
- `content-type=".*javascript.*"` in: #35: -5B...slug-5D-f, antal fel: 53 ( 1.00 betyg )
- X is defined but never used. (totalt 21 st)
- X is not defined. (totalt 17 st)
- Unexpected console statement. (totalt 8 st)
- X is assigned a value but never used. (totalt 7 st)
Integritet & säkerhet
- `< script>` in: #1: Webbsida , antal grupperade fel: 1 ( 4.80 betyg )
- `< script>` in: #1: Webbsida , antal fel: 1 ( 4.80 betyg )
- Parsing error: Unexpected token : (totalt 1 st)
- `< script src="...">` in: #1: Webbsida , antal grupperade fel: 21 ( 1.00 betyg )
- `< script src="...">` in: #1: Webbsida , antal fel: 2843 ( 1.00 betyg )
- Expected an assignment or function call and instead saw an expression. (totalt 1715 st)
- Expected X and instead saw X. (totalt 1057 st)
- Do not access Object.prototype method X from target object. (totalt 34 st)
- X is not modified in this loop. (totalt 8 st)
- Comparing to itself is potentially pointless. (totalt 8 st)
- Unsafe usage of ThrowStatement. (totalt 3 st)
- Unnecessary escape character: \-. (totalt 2 st)
- Unnecessary escape character: \/. (totalt 2 st)
- Unnecessary X. (totalt 2 st)
- Unnecessary escape character: \:. (totalt 1 st)
- X is assigned to itself. (totalt 1 st)
- Unnecessary escape character: \.. (totalt 1 st)
- The Function constructor is eval. (totalt 1 st)
- Async function X has no X expression. (totalt 1 st)
- Async method X has no X expression. (totalt 1 st)
- Unnecessary escape character: \{. (totalt 1 st)
- Unnecessary escape character: \[. (totalt 1 st)
- Unnecessary escape character: \(. (totalt 1 st)
- Unnecessary escape character: \). (totalt 1 st)
- Async arrow function has no X expression. (totalt 1 st)
- Unsafe usage of ReturnStatement. (totalt 1 st)
- `content-type=".*javascript.*"` in: #25: op1.js, antal grupperade fel: 3 ( 4.40 betyg )
- `content-type=".*javascript.*"` in: #25: op1.js, antal fel: 27 ( 1.00 betyg )
- Expected an assignment or function call and instead saw an expression. (totalt 18 st)
- Async method X has no X expression. (totalt 7 st)
- Expected X and instead saw X. (totalt 2 st)
- `content-type=".*javascript.*"` in: #26: matomo.js, antal grupperade fel: 4 ( 4.20 betyg )
- `content-type=".*javascript.*"` in: #26: matomo.js, antal fel: 30 ( 1.00 betyg )
- Expected an assignment or function call and instead saw an expression. (totalt 18 st)
- Async method X has no X expression. (totalt 7 st)
- Do not access Object.prototype method X from target object. (totalt 3 st)
- Expected X and instead saw X. (totalt 2 st)
- `content-type=".*javascript.*"` in: #35: -5B...slug-5D-f, antal grupperade fel: 4 ( 4.20 betyg )
- `content-type=".*javascript.*"` in: #35: -5B...slug-5D-f, antal fel: 33 ( 1.00 betyg )
- Expected an assignment or function call and instead saw an expression. (totalt 21 st)
- Async method X has no X expression. (totalt 7 st)
- Do not access Object.prototype method X from target object. (totalt 3 st)
- Expected X and instead saw X. (totalt 2 st)