56% wgauge

Code Review | wGauge - Free Version

WordPress plugin wGauge - Free Version scored 56% from 54 tests.

About plugin

  • Plugin page: wgauge
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: Jan 22, 2018
  • Latest release: Jan 22, 2018
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: wgauge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 419 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲2.16MB] [CPU: ▼278.33ms] Passed 4 tests

Server-side resources used by wGauge - Free Version
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.62 ▲2.1165.36 ▲13.22
Dashboard /wp-admin5.63 ▲2.2248.07 ▲15.16
Posts /wp-admin/edit.php5.87 ▲2.2352.49 ▲15.04
Add New Post /wp-admin/post-new.php9.08 ▲2.11108.78 ▼1,153.11
Media Library /wp-admin/upload.php5.50 ▲2.2035.44 ▲11.53
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius5.6037.43

Server storage [IO: ▲2.04MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 199 new files
Database: 1 new table, 5 new options
New tables
wp_wg_feedback
New WordPress options
fs_accounts
fs_api_cache
wg_attention_msg
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

Checking browser requirements for wGauge - Free Version
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,145 ▲40118.79 ▲3.0110.08 ▲2.822.26 ▲0.04
Dashboard /wp-admin3,160 ▲2998.13 ▲1.89161.44 ▲30.25172.29 ▲13.79
Posts /wp-admin/edit.php2,990 ▲3025.75 ▲2.5290.67 ▲26.59155.34 ▲11.42
Add New Post /wp-admin/post-new.php1,746 ▲8517.27 ▲0.45439.27 ▼14.29183.17 ▲26.52
Media Library /wp-admin/upload.php1,773 ▲756.85 ▲1.37118.61 ▼23.13201.94 ▲17.35
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius1,6875.3582.34127.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wg_feedback
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_api_cache
    • wg_attention_msg
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wgauge/admin/class-wgauge-admin.php+264
    Undefined index: page

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wgauge/public/partials/wgauge-public-display.php
    • > /wp-content/plugins/wgauge/freemius/templates/ajax-loader.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wgauge/admin/partials/wgauge-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wgauge/public/partials/wgauge-ui.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Javascript (severe) in unknown
    /wp-content/plugins/wgauge/admin/js/wgauge-admin.js?ver=1.0.0 141:72 Uncaught TypeError: Cannot read properties of null (reading 'getContext')
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Javascript (severe) in unknown
    /wp-content/plugins/wgauge/admin/js/wgauge-admin.js?ver=1.0.0 265:72 Uncaught TypeError: Cannot read properties of null (reading 'getContext')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (The wGauge admin monitor) image missing
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wgauge/wgauge.php Passed 13 tests

"wGauge - Free Version" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
55 characters long description:
Gather user experience feedback and explore the results

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin28,743 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1004,36910,72918,745
PO File52,1402,1634,830
Sass20329762,091
JavaScript83872441,859
CSS136041930
Markdown2680214
JSON10040
YAML22028
SVG3006

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,264)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity44.64
▷ Minimum class complexity1.00
▷ Maximum class complexity1,264.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods799
▷ Static methods12715.89%
▷ Public methods60375.47%
▷ Protected methods141.75%
▷ Private methods18222.78%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants104
▷ Global constants8581.73%
▷ Class constants1918.27%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/select-arrow.png0.12KB0.15KB0.00%
public/partials/img/logo-sml.png4.68KB2.66KB▼ 43.22%
admin/img/menu.png0.89KB0.64KB▼ 27.88%
admin/img/logo-big.png13.78KB6.36KB▼ 53.83%
admin/img/premium-frame.png0.95KB0.64KB▼ 32.48%