84% gou-preloader

Code Review | Gou PreLoader

WordPress plugin Gou PreLoader scored84%from 54 tests.

About plugin

  • Plugin page: gou-preloader
  • Plugin version: 3.7.9.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: Oct 22, 2023
  • Number of updates: 66
  • Update frequency: every 8.1 days
  • Top authors: aslamkhangouran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,559 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.43ms] Passed 4 tests

This is a short check of server-side resources used by Gou PreLoader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.51 ▼0.57
Dashboard /wp-admin3.37 ▲0.0754.71 ▲5.94
Posts /wp-admin/edit.php3.49 ▲0.1346.38 ▼1.28
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.77 ▼4.97
Media Library /wp-admin/upload.php3.29 ▲0.0733.47 ▲1.11

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gou PreLoader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.49 ▼1.0014.11 ▲12.6241.96 ▲0.40
Dashboard /wp-admin2,211 ▲305.67 ▼0.0383.84 ▼14.3840.95 ▼2.16
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0533.24 ▼3.5236.91 ▲1.76
Add New Post /wp-admin/post-new.php1,539 ▲1323.17 ▲0.28677.70 ▲22.8651.60 ▼0.63
Media Library /wp-admin/upload.php1,419 ▲164.24 ▲0.0794.70 ▼1.2243.96 ▲0.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gou-preloader/gou-preloader.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gou-preloader/admin/gpi-need-help-popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/gou-preloader/admin/gpl-admin-setting-forms.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-preloader/admin/gpl-admin-configuration-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gou-preloader/admin/gpl-admin-general-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: page preloader, preloader, loader, site loader, site preloader...

gou-preloader/gou-preloader.php Passed 13 tests

"Gou PreLoader" version 3.7.9.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
120 characters long description:
Extension for WordPress to manage PreLoader on your website. Lightweight plugin and easy to customize and user friendly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin781 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP829622447
CSS23513197
JavaScript28213137

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods20
▷ Static methods1785.00%
▷ Public methods1785.00%
▷ Protected methods00.00%
▷ Private methods315.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.22MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/x.png1.17KB1.10KB▼ 5.84%
admin/images/gou-preloader-preview.png225.28KB71.09KB▼ 68.45%