84% image-type-converter

Code Review | Image Type Converter

WordPress plugin Image Type Converter scored 84% from 54 tests.

About plugin

  • Plugin page: image-type-converter
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2023
  • Latest release: Jun 8, 2023
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 253 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
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.34ms] Passed 4 tests

Server-side resources used by Image Type Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.56 ▼1.74
Dashboard /wp-admin3.54 ▲0.2447.27 ▼4.08
Posts /wp-admin/edit.php3.59 ▲0.2348.28 ▲2.07
Add New Post /wp-admin/post-new.php6.06 ▲0.1783.37 ▼2.23
Media Library /wp-admin/upload.php3.40 ▲0.1737.20 ▼1.32
Image Converter /wp-admin/upload.php?page=gpls-wicor-image-converter-settings3.4536.22

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Type Converter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.25 ▼1.133.93 ▲1.8436.19 ▼16.07
Dashboard /wp-admin2,212 ▲245.83 ▲0.90101.87 ▼5.3337.58 ▼8.95
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0239.96 ▲5.1236.13 ▼0.84
Add New Post /wp-admin/post-new.php1,533 ▼023.50 ▲0.18676.94 ▲14.3756.83 ▲5.64
Media Library /wp-admin/upload.php1,397 ▲64.28 ▲0.1096.29 ▼1.5743.17 ▼1.06
Image Converter /wp-admin/upload.php?page=gpls-wicor-image-converter-settings1,4993.8551.1796.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Base' not found in wp-content/plugins/image-type-converter/includes/Settings/SettingsFields/Field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Base' not found in wp-content/plugins/image-type-converter/includes/TypesSupport.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Base' not found in wp-content/plugins/image-type-converter/includes/ImageConverter.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Base' not found in wp-content/plugins/image-type-converter/includes/Modules/SelectImages/SelectImagesModule.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Pages\\PagesBase\\AdminPage' not found in wp-content/plugins/image-type-converter/includes/Pages/SettingsPage.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Base' not found in wp-content/plugins/image-type-converter/includes/Settings/SettingsFields/FieldBase.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WICOR\\Settings\\SettingsBase\\Settings' not found in wp-content/plugins/image-type-converter/includes/Settings/MainSettings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: avif, image converter, webp, gif, png...

image-type-converter/gpls-wicor-image-converter.php 92% from 13 tests

The main file in "Image Type Converter" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-type-converter.php" instead of "gpls-wicor-image-converter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected4,700 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP517552,0944,220
JavaScript77133474
CSS6056

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity18.35
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces14
Interfaces0
Traits6
Classes28
▷ Abstract classes414.29%
▷ Concrete classes2485.71%
▷ Final classes28.33%
Methods268
▷ Static methods9435.07%
▷ Public methods19171.27%
▷ Protected methods3814.18%
▷ Private methods3914.55%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/Core/assets/images/woo-maintenance-mode.png33.48KB11.56KB▼ 65.46%
includes/Core/assets/images/image-sizes-controller.png13.06KB5.90KB▼ 54.82%
includes/Core/assets/images/woo-coming-soon.png13.46KB5.89KB▼ 56.23%
includes/Core/assets/images/woo-quick-view-and-buy-now.png23.32KB8.67KB▼ 62.81%
includes/Core/assets/dist/images/full-logo.png6.58KB3.86KB▼ 41.28%