10% gust

Code Review | Gust

WordPress plugin Gust scored 10% from 54 tests.

About plugin

  • Plugin page: gust
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Apr 27, 2015
  • Number of updates: 22
  • Update frequency: every 22.8 days
  • Top authors: ideag (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

20+ active / 8,377 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/gust/gust.php+62
    Use of undefined constant GUST_NAME - assumed 'GUST_NAME' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.20MB] [CPU: ▲1.26ms] Passed 4 tests

Analyzing server-side resources used by Gust
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2045.48 ▲1.90
Dashboard /wp-admin3.51 ▲0.2053.97 ▲2.85
Posts /wp-admin/edit.php3.63 ▲0.2754.93 ▲6.30
Add New Post /wp-admin/post-new.php6.09 ▲0.2095.18 ▼6.03
Media Library /wp-admin/upload.php3.43 ▲0.2048.73 ▲11.98
Gust /wp-admin/options-general.php?page=gust_options3.4040.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
gust_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Gust
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲713.69 ▼1.054.84 ▲3.0344.84 ▼0.57
Dashboard /wp-admin2,210 ▲75.85 ▲1.01106.06 ▼13.0841.31 ▼14.41
Posts /wp-admin/edit.php2,097 ▲81.99 ▲0.0244.59 ▲6.4738.71 ▲6.12
Add New Post /wp-admin/post-new.php1,517 ▼1617.62 ▼5.82691.89 ▲34.3454.48 ▼9.77
Media Library /wp-admin/upload.php1,386 ▼54.24 ▼0.0195.42 ▼7.9640.72 ▼3.55
Gust /wp-admin/options-general.php?page=gust_options8402.0327.7629.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • gust_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gust/views/header-top.html.php
    • > /wp-content/plugins/gust/views/forgotten.html.php
  • 96× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GUST_PLUGIN_URL - assumed 'GUST_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 28
    • > PHP Warning
      Use of undefined constant GUST_VERSION - assumed 'GUST_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 12
    • > PHP Warning
      Use of undefined constant GUST_VERSION - assumed 'GUST_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 17
    • > PHP Warning
      Use of undefined constant GUST_PLUGIN_URL - assumed 'GUST_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 19
    • > PHP Warning
      Use of undefined constant GUST_PLUGIN_URL - assumed 'GUST_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 16
    • > PHP Warning
      Use of undefined constant GUST_VERSION - assumed 'GUST_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 16
    • > PHP Warning
      Use of undefined constant GUST_VERSION - assumed 'GUST_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 14
    • > PHP Warning
      Use of undefined constant GUST_PLUGIN_URL - assumed 'GUST_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/header-top.html.php on line 19
    • > PHP Warning
      Use of undefined constant GUST_VERSION - assumed 'GUST_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/gust/views/scripts.html.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/gust/views/header.html.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Login screen), #2 (List of posts/pages), #3 (Post editor screen), #4 (**New** - post tagging interface)
The official readme.txt is a good inspiration

gust/gust.php Passed 13 tests

The main PHP script in "Gust" version 0.4.1 is automatically included on every request by WordPress
35 characters long description:
A port of the Ghost admin interface

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin26,157 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript202,6873,59217,746
CSS23175714,494
PHP164217453,343
SVG200574

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity72.12
▷ Minimum class complexity3.00
▷ Maximum class complexity258.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods195
▷ Static methods9950.77%
▷ Public methods12061.54%
▷ Protected methods5427.69%
▷ Private methods2110.77%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png8.41KB3.57KB▼ 57.58%
screenshot-2.png66.71KB30.53KB▼ 54.23%
screenshot-3.png95.50KB41.56KB▼ 56.48%
assets/user-image.png2.36KB1.56KB▼ 34.12%
assets/admin-bar-sprite.png2.41KB2.56KB0.00%