88% fly-dynamic-image-resizer

Code Review | Fly Dynamic Image Resizer

WordPress plugin Fly Dynamic Image Resizer scored 88% from 54 tests.

About plugin

  • Plugin page: fly-dynamic-image...
  • Plugin version: 2.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 5.9.2
  • First release: Sep 30, 2015
  • Latest release: Jan 29, 2022
  • Number of updates: 61
  • Update frequency: every 38.0 days
  • Top authors: junaidbhura (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

7,000+ active / 67,490 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼311.02ms] Passed 4 tests

This is a short check of server-side resources used by Fly Dynamic Image Resizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0258.50 ▲6.52
Dashboard /wp-admin3.43 ▲0.0233.56 ▼0.18
Posts /wp-admin/edit.php3.65 ▲0.0136.16 ▼4.01
Add New Post /wp-admin/post-new.php6.90 ▼0.0796.72 ▼1,234.20
Media Library /wp-admin/upload.php3.30 ▲0.0024.15 ▼5.68
Fly Images /wp-admin/tools.php?page=fly-images3.3020.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Fly Dynamic Image Resizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3616.00 ▲0.316.00 ▲0.152.08 ▼0.26
Dashboard /wp-admin2,897 ▲396.00 ▼0.17111.77 ▼18.74155.26 ▼3.89
Posts /wp-admin/edit.php2,693 ▲23.25 ▲0.0061.59 ▲1.68131.81 ▼3.74
Add New Post /wp-admin/post-new.php1,664 ▼11516.17 ▼6.00413.76 ▼16.50151.80 ▼5.49
Media Library /wp-admin/upload.php1,703 ▲55.47 ▼0.01149.57 ▲5.80198.56 ▲3.16
Fly Images /wp-admin/tools.php?page=fly-images1,0282.3751.53124.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fly-dynamic-image-resizer/fly-dynamic-image-resizer.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/fly-dynamic-image-resizer/inc/class-fly-cli.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'JB\\FlyImages\\Core' not found in wp-content/plugins/fly-dynamic-image-resizer/admin/options.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Tools page), #2 (Delete individual images' cached fly images)
The official readme.txt might help

fly-dynamic-image-resizer/fly-dynamic-image-resizer.php 92% from 13 tests

The principal PHP file in "Fly Dynamic Image Resizer" v. 2.0.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin351 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP673207351

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.00
▷ Minimum class complexity4.00
▷ Maximum class complexity46.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants1100.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
2 compressed PNG files occupy 0.05MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.83KB20.10KB0.00%
screenshot-1.png27.01KB27.54KB0.00%