78% responsive-image-sizes-divi

Code Review | Responsive Image Sizes Divi

WordPress plugin Responsive Image Sizes Divi scored78%from 54 tests.

About plugin

  • Plugin page: responsive-image-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 9
  • Update frequency: every 168.1 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Responsive Image Sizes Divi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.15 ▲2.47
Dashboard /wp-admin3.42 ▲0.1145.28 ▼3.71
Posts /wp-admin/edit.php3.53 ▲0.1747.20 ▲3.36
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.66 ▼0.12
Media Library /wp-admin/upload.php3.34 ▲0.1136.05 ▲2.92
Divi Responsive Image /wp-admin/admin.php?page=wptools-divi-imgsrcset3.3232.96
WP Tools /wp-admin/admin.php?page=wptools3.3232.71

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Image Sizes Divi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.43 ▼0.201.80 ▲0.0644.15 ▲5.64
Dashboard /wp-admin2,222 ▲415.61 ▼0.1189.38 ▼11.2941.34 ▼4.83
Posts /wp-admin/edit.php2,127 ▲271.97 ▼0.0141.33 ▲5.4736.67 ▼1.62
Add New Post /wp-admin/post-new.php1,550 ▲2223.63 ▲0.62710.23 ▲99.8046.88 ▼7.73
Media Library /wp-admin/upload.php1,421 ▲274.21 ▼0.06100.20 ▲3.0142.61 ▼1.52
Divi Responsive Image /wp-admin/admin.php?page=wptools-divi-imgsrcset9252.0126.7427.97
WP Tools /wp-admin/admin.php?page=wptools9132.0626.4134.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/responsive-image-sizes-divi/resources/views/menu.php
    • > /wp-content/plugins/responsive-image-sizes-divi/vendor/wpt00ls/wptools-hub/views/wptools-hub.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/responsive-image-sizes-divi/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/responsive-image-sizes-divi/includes/modules/DiviImageSrcsetExtension.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/responsive-image-sizes-divi/vendor/pimple/pimple/src/Pimple/Psr11/Container.php:37
    • > PHP Notice
      Undefined variable: module_classes in wp-content/plugins/responsive-image-sizes-divi/resources/views/divi-image-srcset-module.php on line 1
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/responsive-image-sizes-divi/vendor/psr/container/src/NotFoundExceptionInterface.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/responsive-image-sizes-divi/src/Loader.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/responsive-image-sizes-divi/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/responsive-image-sizes-divi/includes/modules/DiviImageSrcsetModule/DiviImageSrcsetModule.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/responsive-image-sizes-divi/resources/views/divi-image-srcset-module.php:1
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/responsive-image-sizes-divi/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: responsive images, image sizes, divi

responsive-image-sizes-divi/responsive-image-sizes-divi.php 85% from 13 tests

"Responsive Image Sizes Divi" version 2.0.0'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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin1,803 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP333339481,472
JSX34914216
reStructuredText19413597
JavaScript45210
Markdown1508

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces4
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes210.00%
Methods93
▷ Static methods1920.43%
▷ Public methods9197.85%
▷ Protected methods00.00%
▷ Private methods22.15%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.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