84% easy-image-collage

Code Review | Easy Image Collage

WordPress plugin Easy Image Collage scored84%from 54 tests.

About plugin

  • Plugin page: easy-image-collage
  • Plugin version: 1.13.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 49
  • Update frequency: every 65.4 days
  • Top authors: BrechtVds (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

6,000+ active /98,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.80MB] [CPU: ▲2.85ms] Passed 4 tests

A check of server-side resources used by Easy Image Collage
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6642.73 ▼3.48
Dashboard /wp-admin4.17 ▲0.8651.89 ▲2.74
Posts /wp-admin/edit.php4.22 ▲0.8655.31 ▲9.81
Add New Post /wp-admin/post-new.php6.92 ▲1.0396.86 ▲2.34
Media Library /wp-admin/upload.php4.03 ▲0.8055.62 ▲21.10
Easy Image Collage /wp-admin/options-general.php?page=eic_settings4.6946.13

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 283 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
eic_option
easy-image-collage_version
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Image Collage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲13513.47 ▼0.908.87 ▲7.1738.84 ▼2.73
Dashboard /wp-admin2,199 ▲215.58 ▼0.1494.40 ▼22.0641.40 ▼2.75
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0140.31 ▲4.1536.49 ▲0.80
Add New Post /wp-admin/post-new.php3,838 ▲2,30220.91 ▼2.28870.59 ▲178.9042.61 ▼11.74
Media Library /wp-admin/upload.php1,407 ▲74.30 ▲0.07102.21 ▼7.2366.30 ▲18.33
Easy Image Collage /wp-admin/options-general.php?page=eic_settings2,8753.5499.96109.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • eic_option
    • widget_recent-posts
    • widget_theysaidso_widget
    • easy-image-collage_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 121× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/easy-image-collage/vendor/vafpress/views/control/htmlunsafe.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/easy-image-collage/helpers/vafpress/vafpress_menu_options.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/easy-image-collage/vendor/vafpress/views/control/fontawesome.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/easy-image-collage/vendor/vafpress/constant.php:11
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/easy-image-collage/vendor/vafpress/views/control/html.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/easy-image-collage/vendor/vafpress/classes/control/field/multiselect.php:3
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-image-collage/vendor/vafpress/config/dependencies.php on line 89
    • > PHP Fatal error
      Uncaught Error: Class 'VP_FileSystem' not found in wp-content/plugins/easy-image-collage/vendor/vafpress/classes/metabox.php:14
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-image-collage/vendor/vafpress/config/dependencies.php on line 113
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/easy-image-collage/vendor/vafpress/views/control/html.php on line 4

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: image, grid, photo, gallery, collage

easy-image-collage/easy-image-collage.php Passed 13 tests

"Easy Image Collage" version 1.13.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Create beautiful responsive image collages for all your posts and pages

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected27,011 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PHP1092,2722,38411,622
CSS246852116,269
JavaScript576224534,221
Sass16155271,831
LESS1323331,247
SVG200934
Markdown41910364
PO File2130152305
CoffeeScript17866217
JSON1001

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.96
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes73
▷ Abstract classes45.48%
▷ Concrete classes6994.52%
▷ Final classes00.00%
Methods584
▷ Static methods9616.44%
▷ Public methods54793.66%
▷ Protected methods203.42%
▷ Private methods172.91%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants3592.11%
▷ Class constants37.89%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
29 PNG files occupy 0.49MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/vafpress/public/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
img/logo.png8.34KB4.43KB▼ 46.86%
vendor/vafpress/public/img/vp-logo.png1.94KB0.66KB▼ 65.94%
vendor/vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%