Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

### Required

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/types.ts#L62)][[2](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/DataManager.ts#L29)][[3](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L20)][[4](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/SettingsTab.ts#L255)][[5](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L487)][[6](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L847)][[7](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L887)][[8](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/main.ts#L348)]:Obsidian's configuration directory isn't necessarily `.obsidian`, it can be configured by the user. You can access the configured value from `Vault#configDir`

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L61)][[2](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L618)][[3](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L671)][[4](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L603)][[5](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L1307)][[6](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L60)]:Using `innerHTML`, `outerHTML` or similar API's is a security risk. Instead, use the DOM API or the Obsidian helper functions: <https://docs.obsidian.md/Plugins/User+interface/HTML+elements>

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L574)][[2](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L588)][[3](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L589)][[4](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L590)][[5](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L606)][[6](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L607)][[7](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L608)][[8](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L609)][[9](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L610)][[10](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L611)][[11](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L612)][[12](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L613)][[13](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L640)][[14](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/ChartRenderer.ts#L641)][[15](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L55)][[16](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L59)][[17](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L85)][[18](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L89)][[19](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L91)][[20](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L95)][[21](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L109)][[22](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L112)][[23](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L198)][[24](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L199)][[25](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L200)][[26](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L201)][[27](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L202)][[28](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L203)][[29](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L204)][[30](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/ui/StatusBarManager.ts#L205)] and more :You should avoid assigning styles via JavaScript or in HTML and instead move all these styles into CSS so that they are more easily adaptable by themes and snippets.


[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/main.ts#L149)]:Do not detach leaves with your custom view in `onunload`, this is an antipattern, see: <https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines#Don't+detach+leaves+in+%60onunload%60>

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/Modal.ts#L3-L86)]:Remember to rename the sample classes to something that makes sense to your plugin. If there are any errors, Obsidian will spit out this class name, so this will be important for users to debug if they need to.

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L39)][[2](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L218)][[3](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L229)][[4](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L233)][[5](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L234)][[6](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L240)][[7](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L272)][[8](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L285)][[9](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L294)][[10](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L295)][[11](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L299)][[12](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L311)][[13](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L319)][[14](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L645)][[15](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L714)][[16](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L735)][[17](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/storage/FileTrackerManager.ts#L742)][[18](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L48)][[19](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L947)][[20](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L1085)][[21](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/components/PluginView.ts#L1118)][[22](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/api/AuthService.ts#L366)][[23](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/api/AuthService.ts#L498)][[24](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/api/AuthService.ts#L582)][[25](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/api/AuthService.ts#L651)][[26](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/api/ApiService.ts#L338)][[27](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L92)][[28](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L108)][[29](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L402)][[30](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L421)] and more :You should consider limiting the number of `console.log`s in your code, to not pollute the dev console.



---

### Optional

[[1](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L385)][[2](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/core/TimeTracker.ts#L415)][[3](https://github.com/createitv/obsidian-usage-stats/blob/93202f975f836f63e73f4f597448d3b61a7e12ef/src/main.ts#L525)]:Casting to `any` should be avoided as much as possible.



---



Do <b>NOT</b> open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with `/skip` and the reason why you think the results are incorrect.