Review of "Zeo Monitor Widget" version 3

Details Page Preview

Zeo-style desktop widgets for GNOME. Currently provides a floating monitering card.

Extension Homepage
https://github.com/mohitjoer/zeo-widgets

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:93
    GLib.file_get_contents(vendorPath)
  • extension.js:112
    GLib.file_get_contents(ueventPath)
  • extension.js:374
    GLib.file_get_contents(actPath)
  • extension.js:375
    GLib.file_get_contents(maxPath)
  • extension.js:396
    GLib.file_get_contents(busyPath)
  • extension.js:404
    GLib.file_get_contents(freqPath)
  • extension.js:420
    GLib.file_get_contents(freqPath)
  • extension.js:571
    GLib.file_get_contents('/proc/stat')
  • extension.js:610
    GLib.file_get_contents('/proc/meminfo')

EGO-X-002 warning

extensions should not use synchronous subprocess APIs in shell code

Shell code should avoid synchronous subprocess APIs like `GLib.spawn_command_line_sync()` and `GLib.spawn_sync()`.

Complete Examples

  • extension.js:51
    GLib.spawn_command_line_sync('lspci -vmm')
  • extension.js:131
    GLib.spawn_command_line_sync(
                        'nvidia-smi --query-gpu=name --format=csv,noheader,nounits')
  • extension.js:449
    GLib.spawn_command_line_sync(
                'nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total --format=csv,noheader,nounits')
  • extension.js:626
    GLib.spawn_command_line_sync('df --output=used,size,pcent / ')

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:328
            this._detailLabel = new St.Label({
                text: '—',
                style_class: 'zeo-ring-detail',
                x_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:290
            this._drawingArea = new St.DrawingArea({
                width: RING_SIZE,
                height: RING_SIZE,
            })
  • extension.js:321
            this._nameLabel = new St.Label({
                text: label,
                style_class: 'zeo-ring-name',
                x_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:304
            this._pctLabel = new St.Label({
                text: '0%',
                style_class: 'zeo-ring-pct',
                x_align: Clutter.ActorAlign.CENTER,
                y_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:335
            this.actor = new St.BoxLayout({
                vertical: true,
                x_align: Clutter.ActorAlign.CENTER,
                style_class: 'zeo-ring-cell',
            })

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:328
            this._detailLabel = new St.Label({
                text: '—',
                style_class: 'zeo-ring-detail',
                x_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:321
            this._nameLabel = new St.Label({
                text: label,
                style_class: 'zeo-ring-name',
                x_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:304
            this._pctLabel = new St.Label({
                text: '0%',
                style_class: 'zeo-ring-pct',
                x_align: Clutter.ActorAlign.CENTER,
                y_align: Clutter.ActorAlign.CENTER,
            })
  • extension.js:335
            this.actor = new St.BoxLayout({
                vertical: true,
                x_align: Clutter.ActorAlign.CENTER,
                style_class: 'zeo-ring-cell',
            })

All Versions

Version Status
6 Unreviewed
5 Rejected
4 Rejected
3 Rejected
2 Inactive
1 Rejected

Previous Reviews on this Version

mohitjoer posted a review
fixed few bugs
mohitjoer posted a review
fixed few bugs
JustPerfection rejected
1. Remove unnecessary keys from `metadata.json`. 2. Didn't review since shexli issues need to be fixed first.