71% image-comparison-elementor-addon

Code Review | Image Comparison Addon for Elementor

WordPress plugin Image Comparison Addon for Elementor scored71%from 54 tests.

About plugin

  • Plugin page: image-comparison-...
  • Plugin version: 1.0.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 26, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 6
  • Update frequency: every 192.2 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,336 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▲1,032.77ms] 50% from 4 tests

An overview of server-side resources used by Image Comparison Addon for Elementor
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 654.69ms on /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 1,032.77ms on /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.19609.53 ▲560.33
Dashboard /wp-admin3.60 ▲0.301,479.41 ▲1,431.32
Posts /wp-admin/edit.php3.60 ▲0.241,245.37 ▲1,197.51
Add New Post /wp-admin/post-new.php6.08 ▲0.201,276.57 ▲1,186.05
Media Library /wp-admin/upload.php3.44 ▲0.211,218.86 ▲1,187.19
Recommended /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins3.36654.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 50 new files
Database: no new tables, 13 new options
New WordPress options
jlticel_notice_what_we_collect
widget_recent-posts
jlticel_sheet_promo_data
jlticel_sheet_promo_data_hash
theysaidso_admin_options
image_comparison_elementor_addon_version
db_upgraded
widget_theysaidso_widget
jlticel_activation_time
jlticel_notice_subscribe
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Comparison Addon for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,013 ▲26713.37 ▼1.001.80 ▼0.3738.07 ▼5.82
Dashboard /wp-admin2,392 ▲2044.85 ▼0.05100.15 ▼15.7540.99 ▼1.79
Posts /wp-admin/edit.php2,206 ▲1142.11 ▲0.0939.80 ▲2.4832.63 ▼3.02
Add New Post /wp-admin/post-new.php1,623 ▲10321.20 ▼2.00568.66 ▼111.0753.92 ▼2.17
Media Library /wp-admin/upload.php1,503 ▲1124.22 ▲0.0297.09 ▼4.6741.34 ▼1.22
Recommended /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins1,2842.0129.5628.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 13 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • jlticel_sheet_promo_data
    • widget_theysaidso_widget
    • jlticel_notice_ask_for_rating
    • image_comparison_elementor_addon_version
    • theysaidso_admin_options
    • widget_recent-posts
    • jlticel_notice_what_we_collect
    • jlticel_notice_subscribe
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins
    • > Notice in wp-admin/includes/plugin-install.php+498
    Undefined property: stdClass::$version

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
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Inc\\Classes\otifications\\Model\\Popup' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Notifications/Upgrade_Notice.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Libs\\Recommended' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Recommended_Plugins.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/image-comparison-elementor-addon/image-comparison-elementor-addon.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Notifications/Subscribe.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Notifications/Ask_For_Rating.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Libs\\Upgrader' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Notifications/What_We_Collect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELIC\\Libs\\RowLinks' not found in wp-content/plugins/image-comparison-elementor-addon/Inc/Classes/Row_Links.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=image-comparison-elementor-addon-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% 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
10 plugin tags: image, after before, elementor addon, image comparison addon, image comparison...

image-comparison-elementor-addon/image-comparison-elementor-addon.php 85% from 13 tests

"Image Comparison Addon for Elementor" version 1.0.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages/")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin5,195 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP389281,4793,858
JavaScript417293702
CSS412217635

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.03
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits2
Classes27
▷ Abstract classes414.81%
▷ Concrete classes2385.19%
▷ Final classes14.35%
Methods205
▷ Static methods3215.61%
▷ Public methods19997.07%
▷ Protected methods41.95%
▷ Private methods20.98%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants18
▷ Global constants1583.33%
▷ Class constants316.67%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.19MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/after.png5.58KB0.00KB▼ 100.00%
(invalid) assets/images/before.png5.74KB0.00KB▼ 100.00%
(invalid) assets/images/promo-image.png185.79KB0.00KB▼ 100.00%