84% image-size-selection-for-divi

Code Review | Image Size Selection for Divi

WordPress plugin Image Size Selection for Divi scored84%from 54 tests.

About plugin

  • Plugin page: image-size-select...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 19, 2018
  • Latest release: May 5, 2020
  • Number of updates: 22
  • Update frequency: every 29.9 days
  • Top authors: BoltonStudios (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /7,681 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
Install script ran successfully

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

An overview of server-side resources used by Image Size Selection for Divi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.80 ▼5.07
Dashboard /wp-admin3.31 ▲0.0049.44 ▲0.39
Posts /wp-admin/edit.php3.36 ▲0.0048.18 ▼4.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.79 ▼10.73
Media Library /wp-admin/upload.php3.23 ▲0.0032.48 ▼0.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Image Size Selection for Divi
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.53 ▼0.871.72 ▼0.1240.24 ▼4.12
Dashboard /wp-admin2,203 ▲125.82 ▼0.0699.03 ▼6.8243.65 ▼1.39
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0138.89 ▼2.2135.30 ▼1.15
Add New Post /wp-admin/post-new.php1,514 ▼2117.62 ▼5.59686.57 ▼33.6155.95 ▲4.00
Media Library /wp-admin/upload.php1,391 ▲94.21 ▲0.0298.44 ▼0.5141.88 ▼2.36

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/image-size-selection-for-divi/includes/ImageSizeSelectionForDivi.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-size-selection-for-divi/image-size-selection-for-divi.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/image-size-selection-for-divi/includes/modules/ImageSizeSelection/ImageSizeSelection.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: divi builder, seo, cropped, divi, image size

image-size-selection-for-divi/image-size-selection-for-divi.php 92% from 13 tests

The primary PHP file in "Image Size Selection for Divi" version 1.0.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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
Good job! No executable or dangerous file extensions detected1,156 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP451112562
Markdown12120453
PO File14856136
CSS2002
JavaScript2002
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity31.00
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods550.00%
▷ Protected methods550.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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