67% goon-plugin-control

Code Review | Goon - Speed Up Your WordPress Site

WordPress plugin Goon - Speed Up Your WordPress Site scored67%from 54 tests.

About plugin

  • Plugin page: goon-plugin-control
  • Plugin version: 1.2.9.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 7, 2021
  • Latest release: Aug 15, 2022
  • Number of updates: 11
  • Update frequency: every 26.0 days
  • Top authors: getgoon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /504 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.09MB] [CPU: ▲30.83ms] 75% from 4 tests

This is a short check of server-side resources used by Goon - Speed Up Your WordPress Site
The following require your attention
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.09MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.80 ▲5.3475.91 ▲33.39
Dashboard /wp-admin8.82 ▲5.5284.71 ▲34.37
Posts /wp-admin/edit.php8.82 ▲5.4685.41 ▲34.85
Add New Post /wp-admin/post-new.php9.95 ▲4.06115.86 ▲20.70
Media Library /wp-admin/upload.php8.82 ▲5.5984.37 ▲44.52
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.8275.17

Server storage [IO: ▲3.35MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (24.60KB) outside of "wp-content/plugins/goon-plugin-control/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/class-goon-mu.php
Filesystem: 207 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
default_term_goon_categories
fs_active_plugins
can_compress_scripts
goon_categories_children
fs_gdpr
widget_recent-comments
widget_recent-posts
fs_debug_mode
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Goon - Speed Up Your WordPress Site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20113.28 ▼0.911.56 ▼0.1833.77 ▼9.51
Dashboard /wp-admin2,310 ▲1305.09 ▼0.54120.16 ▲27.1343.24 ▼2.50
Posts /wp-admin/edit.php2,216 ▲1132.43 ▲0.4040.00 ▼0.1036.01 ▲0.74
Add New Post /wp-admin/post-new.php1,621 ▲9322.91 ▼0.08676.32 ▼33.1636.30 ▼16.88
Media Library /wp-admin/upload.php1,512 ▲1154.66 ▲0.41107.84 ▼6.7648.53 ▲0.35
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,1522.0235.2932.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/goon-plugin-control/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • fs_debug_mode
    • fs_gdpr
    • widget_recent-comments
    • fs_accounts
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_active_plugins
    • widget_recent-posts
    • default_term_goon_categories
    • goon_categories_children
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/goon-plugin-control/admin/pages/page-support.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/goon-plugin-control/admin/pages/page-filters-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/goon-plugin-control/includes/class-goon-mu.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/goon-plugin-control/admin/pages/page-overview-display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/goon-plugin-control/admin/pages/page-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GOON_Admin_Helper' not found in wp-content/plugins/goon-plugin-control/admin/pages/page-groups-edit.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/goon-plugin-control/admin/pages/page-groups-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_categories() in wp-content/plugins/goon-plugin-control/admin/pages/page-categories-list.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'GOON_Admin_Helper' not found in wp-content/plugins/goon-plugin-control/admin/pages/page-filters-edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/goon-plugin-control/admin/pages/page-overview.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GOON_Admin_Helper' not found in wp-content/plugins/goon-plugin-control/admin/pages/page-categories-edit.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: speed up, performance, save time, goon, optimization...

goon-plugin-control/goon.php 85% from 13 tests

"Goon - Speed Up Your WordPress Site" version 1.2.9.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("goon-plugin-control.php" instead of "goon.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin36,348 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1308,20716,63233,472
CSS17254731,860
JavaScript86292331,016

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity77.28
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,260
▷ Static methods22918.17%
▷ Public methods91572.62%
▷ Protected methods151.19%
▷ Private methods33026.19%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/noimage.png2.08KB2.20KB0.00%
assets/icon-128x128-white.png5.44KB2.63KB▼ 51.62%
assets/goon-logo-smaller.png5.39KB3.57KB▼ 33.74%
assets/icon-128x128.png6.11KB2.67KB▼ 56.30%
admin/img/check_mark.png0.55KB0.62KB0.00%