Review of "Net Totals Simplified" version 7

Details Page Preview

A Net totals extension that only displays totals.

Extension Homepage
https://github.com/avrain27/nettotalssimplified

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 7

Shexli found 7 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:364
    input_file.load_contents(null)

EGO-P-006 warning

unnecessary build and translation artifacts should not be shipped

Compiled GSettings schemas should not be shipped for 45+ packages.

Don't include unnecessary files

  • schemas/gschemas.compiled
    schemas/gschemas.compiled

EGO-L-002 warning

objects created by extension should be destroyed in disable()

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

Destroy all objects

  • extension.js:186
            this.tsLabel = new St.Label({
                text: 'Σ --',
                y_align: Clutter.ActorAlign.CENTER,
                x_expand: true,
                y_expand: false
            })

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • extension.js:186
            this.tsLabel = new St.Label({
                text: 'Σ --',
                y_align: Clutter.ActorAlign.CENTER,
                x_expand: true,
                y_expand: false
            })

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:469
                this._allocationTimeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, () => {
                    this._allocationTimeout = null;
                    this.updateStyles();
                    return GLib.SOURCE_REMOVE;
                })
  • extension.js:200
                this._styleTimeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, () => {
                    this._styleTimeout = null;
                    this.updateStyles();
                    return GLib.SOURCE_REMOVE;
                })
  • extension.js:502
            this.timeout = GLib.timeout_add_seconds(
                GLib.PRIORITY_DEFAULT,
                this.currentSettings.refreshTime,
                () => this.parseStat()
            )

EGO-L-007 warning

main loop sources should be removed before being recreated

Main loop sources should be removed before creating a new source on the same field.

Remove main loop sources

  • extension.js:462
            this.timeout = GLib.timeout_add_seconds(
                GLib.PRIORITY_DEFAULT,
                this.currentSettings.refreshTime,
                () => this.parseStat()
            )

EGO-C45-001 warning

45+ preferences should use fillPreferencesWindow instead of getPreferencesWidget

45+ preferences code should use `fillPreferencesWindow()` instead of `getPreferencesWidget()`.

Preferences

  • prefs.js:8
        getPreferencesWidget() {
            const settings = this.getSettings(SCHEMA_ID);
            let currentSettings = this._fetchSettings(settings);
    
            const vbox = new Gtk.Box({
                orientation: Gtk.Orientation.VERTICAL,
                margin_start: 25,
                margin_end: 25,
               

All Versions

Version Status
7 Active
6 Active
5 Rejected
4 Inactive
3 Inactive
2 Rejected
1 Rejected

Previous Reviews on this Version

fmuellner active