Review of "Anahita Wallpaper Changer" version 2

Details Page Preview

Automatically change desktop wallpapers right from your top bar. Connects to popular online providers (Unsplash, Wallhaven, Bing) or local picture folders, featuring one-click Next/Previous controls, dynamic categories, and independent multi-monitor displays.

Extension Homepage
https://github.com/ibehii/Wallpaper-changer

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 4

Shexli found 4 issues that may need reviewer attention.

EGO-X-004 warning

extensions should avoid synchronous file IO in shell code

Shell code should avoid synchronous file IO APIs like `GLib.file_get_contents()` and `Gio.File.load_contents()`.

File Operations

  • extension.js:156
    file.load_contents(null)

EGO-A-004 warning

extension files should not contain excessive ungated console logging

File contains 6 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • extension.js:48
    console.error(`Failed to scan local photos in ${path}`, e)
  • extension.js:74
    console.error(`Failed to launch: ${argv.join(' ')}`, e)
  • extension.js:131
    console.error(`Failed to create directory ${dir}`, e)
  • extension.js:167
    console.error('Failed to load history.json', e)
  • extension.js:184
    console.error('Failed to write history.json', e)
  • extension.js:834
    console.error('Failed to copy wallpaper to favorites', e)

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:340
            this._useLocalSourceSwitch.connect('toggled', (item, state) => {
                this._settings.set_string('wallpaper-source', state ? 'local' : 'online');
                if (state)
                    this._ensureRotatorEnabled();
            })
  • extension.js:588
            this.menu.connect('open-state-changed', (menu, isOpen) => {
                if (isOpen)
                    this._updateNavButtons();
            })
  • extension.js:354
            localSubMenu.menu.connect('open-state-changed', (menu, isOpen) => {
                if (!isOpen)
                    return;
                const localDir = this._getLocalPhotosDirectory();
                const photos = getLocalPhotos(localDir, this._settings.get_boolean('recursive-scan'));
                co
  • extension.js:419
            sourcesSubMenu.menu.connect('open-state-changed', (menu, isOpen) => {
                if (isOpen)
                    this._updateProviderOrnaments();
            })

EGO-L-004 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • extension.js:654
            this._rotatorTimerId = GLib.timeout_add_seconds(
                GLib.PRIORITY_DEFAULT,
                intervalSec,
                () => {
                    this._triggerWchangerRotation();
                    return GLib.SOURCE_CONTINUE;
                }
            )

All Versions

Version Status
2 Unreviewed
1 Rejected