88% adaptive-images

Code Review | Adaptive Images for WordPress

WordPress plugin Adaptive Images for WordPress scored 88% from 54 tests.

About plugin

  • Plugin page: adaptive-images
  • Plugin version: 0.6.68
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Apr 18, 2015
  • Latest release: May 8, 2020
  • Number of updates: 161
  • Update frequency: every 14.1 days
  • Top authors: nevma (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

8,000+ active / 137,593 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼141.06ms] Passed 4 tests

An overview of server-side resources used by Adaptive Images for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.0525.71 ▲5.36
Dashboard /wp-admin3.08 ▲0.0352.00 ▲7.84
Posts /wp-admin/edit.php3.13 ▲0.0350.30 ▲2.12
Add New Post /wp-admin/post-new.php5.44 ▲0.00100.30 ▼572.04
Media Library /wp-admin/upload.php3.02 ▲0.0236.43 ▲0.31
Adaptive Images /wp-admin/options-general.php?page=adaptive-images2.9730.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Adaptive Images for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,746 ▲15015.95 ▲0.0211.77 ▲0.2947.19 ▲1.30
Dashboard /wp-admin3,003 ▲696.08 ▲0.11142.70 ▼15.32123.86 ▲5.38
Posts /wp-admin/edit.php2,776 ▲372.84 ▲0.1278.28 ▲3.6897.33 ▲1.81
Add New Post /wp-admin/post-new.php1,710 ▲2718.72 ▲0.08398.13 ▼9.90121.65 ▼1.98
Media Library /wp-admin/upload.php1,847 ▲405.04 ▲0.02163.45 ▲11.55131.21 ▲1.92
Adaptive Images /wp-admin/options-general.php?page=adaptive-images1,7652.4963.24138.23

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
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=adaptive-images
    • > Notice in wp-content/plugins/adaptive-images/adaptive-images-admin.php+732
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/adaptive-images/adaptive-images-script.php
    • > /wp-content/plugins/adaptive-images/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #0 in adaptive-images/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

adaptive-images/adaptive-images.php Passed 13 tests

This is the main PHP file of "Adaptive Images for WordPress" version 0.6.68, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
Resizes your images, by device screen size, to reduce download time in the mobile web.

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
No dangerous file extensions were detected1,719 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,6029491,719

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions68
▷ Named functions68100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin