72% change-responsive-images-rv

Code Review | Responsive Images

WordPress plugin Responsive Images scored72%from 54 tests.

About plugin

  • Plugin page: change-responsive...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2019
  • Latest release: Oct 15, 2019
  • Number of updates: 14
  • Update frequency: every 2.0 days
  • Top authors: richard.venancio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.93ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.89 ▲1.29
Dashboard /wp-admin3.42 ▲0.1155.68 ▲6.47
Posts /wp-admin/edit.php3.53 ▲0.1752.93 ▲2.72
Add New Post /wp-admin/post-new.php6.00 ▲0.1286.56 ▼18.47
Media Library /wp-admin/upload.php3.34 ▲0.1138.83 ▲2.75
Media Options /wp-admin/options-general.php?page=media-description3.2833.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.011.96 ▲0.3144.98 ▲2.95
Dashboard /wp-admin2,199 ▲225.63 ▼0.0186.85 ▼6.1138.11 ▼2.60
Posts /wp-admin/edit.php2,101 ▼22.00 ▼0.0340.13 ▲1.8936.46 ▼2.10
Add New Post /wp-admin/post-new.php1,540 ▼118.49 ▲0.28643.45 ▼32.7579.20 ▲20.00
Media Library /wp-admin/upload.php1,401 ▲44.20 ▼0.0598.46 ▼4.1843.72 ▲0.00
Media Options /wp-admin/options-general.php?page=media-description1,1562.1327.9730.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: thumbnail
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+234
    Undefined index: name
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+237
    Undefined index: description
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+239
    Undefined index: responsive
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+241
    Undefined index: replaceable
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: medium
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: medium_large
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: large
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: 1536x1536
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: 2048x2048
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+225
    Undefined index: post-thumbnail
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+249
    Undefined index: default_size_attr
    • > GET request to /wp-admin/options-general.php?page=media-description
    • > Notice in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php+255
    Undefined index: default_size_attr_in_loop

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/change-responsive-images-rv/change-responsive-images-rv.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Packsystem\\is_admin() in wp-content/plugins/change-responsive-images-rv/ChangeResponsiveImages.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: images art direction, images, responsive, responsive images, customize images

change-responsive-images-rv/change-responsive-images-rv.php 92% from 13 tests

The main PHP script in "Responsive Images" version 1.1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin407 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38090376
PO File110231

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin