83% avif-support

Code Review | AVIF Support | AVIF Uploader

WordPress plugin AVIF Support | AVIF Uploader scored83%from 54 tests.

About plugin

  • Plugin page: avif-support
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Oct 15, 2023
  • Number of updates: 11
  • Update frequency: every 22.5 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /3,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.44MB] [CPU: ▼0.96ms] Passed 4 tests

Server-side resources used by AVIF Support | AVIF Uploader
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4443.82 ▲8.02
Dashboard /wp-admin3.75 ▲0.4449.72 ▲0.64
Posts /wp-admin/edit.php3.80 ▲0.4449.96 ▲3.05
Add New Post /wp-admin/post-new.php6.33 ▲0.4493.13 ▼14.80
Media Library /wp-admin/upload.php3.67 ▲0.4439.24 ▲7.27
AVIF Support /wp-admin/upload.php?page=gpls-avfstw-avif-support-settings3.5930.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AVIF Support | AVIF Uploader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▼0.181.93 ▲0.4446.35 ▲7.96
Dashboard /wp-admin2,198 ▲215.62 ▲0.0480.95 ▼9.3040.53 ▲1.98
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0639.56 ▲0.1736.41 ▲0.62
Add New Post /wp-admin/post-new.php1,531 ▼623.26 ▲4.96596.02 ▼44.5549.56 ▼22.11
Media Library /wp-admin/upload.php1,409 ▲124.17 ▼0.0495.30 ▼6.0140.89 ▼9.84
AVIF Support /wp-admin/upload.php?page=gpls-avfstw-avif-support-settings1,3462.1130.1753.82

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Undefined constant 'ABSPATH' in wp-content/plugins/avif-support/includes/AVIFGDEditor.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_AVFSTW\\Base' not found in wp-content/plugins/avif-support/includes/AvifSupport.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_AVFSTW\\Pages\\PagesBase\\AdminPage' not found in wp-content/plugins/avif-support/includes/Pages/SettingsPage.php:11

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 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in avif-support/assets to your readme.txt
The official readme.txt might help

avif-support/gpls-avif-support.php 77% from 13 tests

Analyzing the main PHP file in "AVIF Support | AVIF Uploader" version 1.0.4
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("avif-support.php" instead of "gpls-avif-support.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,199 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP233841,2002,191
CSS5055
JavaScript3063

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity25.50
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits3
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods141
▷ Static methods6143.26%
▷ Public methods10775.89%
▷ Protected methods149.93%
▷ Private methods2014.18%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.36MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/Core/assets/images/wp-watermark-images.png38.45KB14.82KB▼ 61.45%
includes/Core/assets/dist/images/logo-icon-md.png0.91KB0.96KB0.00%
includes/Core/assets/dist/images/logo-icon-lg.png3.56KB2.72KB▼ 23.62%
includes/Core/assets/images/woo-cart-limiter.png17.63KB7.17KB▼ 59.36%
includes/Core/assets/images/wp-paypal-subscriptions.png17.91KB7.09KB▼ 60.39%