89% gifload

Code Review | Gifload

WordPress plugin Gifload scored 89% from 54 tests.

About plugin

  • Plugin page: gifload
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Dec 5, 2016
  • Latest release: Dec 12, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: auth0x (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 648 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.16MB] [CPU: ▼163.97ms] Passed 4 tests

A check of server-side resources used by Gifload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.0518.76 ▼2.30
Dashboard /wp-admin2.98 ▼0.0826.72 ▼16.86
Posts /wp-admin/edit.php3.04 ▼0.0728.85 ▼12.21
Add New Post /wp-admin/post-new.php4.99 ▼0.4571.06 ▼619.01
Media Library /wp-admin/upload.php2.95 ▼0.0524.71 ▼7.80
GifLoad /wp-admin/options-general.php?page=gifload2.9621.93

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Gifload: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,913 ▲31717.65 ▲2.0110.42 ▼1.2443.11 ▼5.35
Dashboard /wp-admin3,172 ▲2387.93 ▲1.78152.47 ▲10.62110.81 ▼4.75
Posts /wp-admin/edit.php2,973 ▲2344.15 ▲1.4480.54 ▲13.1399.04 ▲0.95
Add New Post /wp-admin/post-new.php1,684 ▲1218.90 ▼0.15362.47 ▼30.90127.27 ▲24.78
Media Library /wp-admin/upload.php1,819 ▲94.65 ▼0.36121.52 ▼23.84121.95 ▲0.99
GifLoad /wp-admin/options-general.php?page=gifload1,3293.3169.7379.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gifload
    • > Notice in wp-content/plugins/gifload/admin/class-gifload-admin.php+213
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/gifload/admin/partials/gifload-admin-display.php
    • > /wp-content/plugins/gifload/public/partials/gifload-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: image, gifs, lazyload, video, thumbnail...

gifload/gifload.php Passed 13 tests

The principal PHP file in "Gifload" v. 1.0.0 is loaded by WordPress automatically on each request
98 characters long description:
This plugin generates thumbnails from gif files, reducing page load time and offering a better UX.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected560 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12174575343
JavaScript25616217
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin