10% responsive-image-widget

Code Review | Responsive Image Widget

WordPress plugin Responsive Image Widget scored10%from 54 tests.

About plugin

  • Plugin page: responsive-image-...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Jul 22, 2013
  • Number of updates: 11
  • Update frequency: every 1.3 days
  • Top authors: benarobinson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /23,758 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/responsive-image-widget/responsive_image_widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; ResponsiveImageWidget has a deprecated constructor

Server metrics [RAM: ▼5.13MB] [CPU: ▼629,206.17ms] Passed 4 tests

Server-side resources used by Responsive Image Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼14.164.80 ▼2,516,635.44
Dashboard /wp-admin2.11 ▼1.247.01 ▼49.37
Posts /wp-admin/edit.php2.11 ▼1.307.74 ▼46.65
Add New Post /wp-admin/post-new.php2.11 ▼3.837.41 ▼93.20
Media Library /wp-admin/upload.php2.11 ▼1.175.06 ▼33.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_responsiveimagewidget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Image Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.171.75 ▼0.0344.10 ▲4.84
Dashboard /wp-admin2,195 ▲155.52 ▼0.1394.13 ▲5.2745.29 ▲3.13
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0035.12 ▲0.5534.36 ▼2.98
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▲0.06737.60 ▲42.0257.49 ▼1.61
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.01100.48 ▼4.2642.81 ▼4.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/responsive-image-widget/responsive_image_widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; ResponsiveImageWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_responsiveimagewidget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/responsive-image-widget/responsive_image_widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: responsive, easy, widget, image

responsive-image-widget/responsive_image_widget.php 85% from 13 tests

"Responsive Image Widget" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-image-widget.php" instead of "responsive_image_widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

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 plugin96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131496

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 files were detected