# Scoring Method

Currently, there are `23` rules for experience scoring, divided into three categories: `Performance`, `Experience`, and `Best Practices`. Satisfying the rule requirements earns a score of `100 points`, otherwise, the score is `0 points`. Finally, the total score is calculated based on the weights of each rule and the formula.

## Formula for Calculating Total Score

1. Multiply the score of each item by its corresponding weight.
2. Add up all the products to get the total weighted score.
3. Add up all the weights to get the total weight.
4. Divide the total weighted score by the total weight to get the weighted average score.

The formula can be expressed in data as:

```math
\text{Total Score} = \frac{\sum_{i=1}^{n} Score_i \cdot Weight_i}{\sum_{i=1}^{n} Weight_i}
```

### Notes

> Rules with a weight of 0 do not participate in scoring and are only Note.
> Rules that are not met in the detection process will not participate in scoring.
> The scoring conditions for each rule may also be adjusted with the version update of the IDE.

## Weights

### Performance

| Rule                          | Weight |
| ----------------------------- | ------ |
| `FMP`(First Meaningful Paint) | 10     |
| Rendering Time                | 3      |
| Page Minimum Frame Rate       | 5      |
| Script Execution Time         | 5      |
| `setData` Call Frequency      | 6      |
| `setData` Data Size           | 8      |
| `TYML` Node Count             | 6      |
| Network Request Duration      | 7      |
| Network Concurrent Requests   | 5      |
| Image Requests                | 5      |
| Image Size Detection          | 4      |
| Miniapp Package Size          | 8      |
| `TTT` Interaction Frequency   | 8      |

### Experience

| Rule                                 | Weight |
| ------------------------------------ | ------ |
| Whether to use `APP` theme variables | 5      |
| Whether to adapt dark mode           | 5      |
| Multilingual Usage                   | 10     |
| Clickable Element Response Area      | 6      |
| Security Area Compatibility          | 5      |

### Best Practices

| Rule                          | Weight |
| ----------------------------- | ------ |
| JS Exception Detection        | 8      |
| Use HTTPS                     | 1      |
| Package Image Detection       | 3      |
| Image Domain Compliance       | 1      |
| DP Report Frequency Detection | 1      |

### Rule Description

The detailed rule descriptions can be referenced in the following documents:

- [Performance](/en/miniapp/devtools/tools/extension/audit/performance)
- [Experience](/en/miniapp/devtools/tools/extension/audit/experience)
- [Best Practices](/en/miniapp/devtools/tools/extension/audit/best-practice)
