68% unite-gallery-lite

Code Review | Unite Gallery Lite

WordPress plugin Unite Gallery Lite scored 68% from 53 tests.

About plugin

  • Plugin page: unite-gallery-lite
  • Plugin version: 1.7.54
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 5.8.1
  • First release: Apr 15, 2015
  • Latest release: May 4, 2020
  • Number of updates: 82
  • Update frequency: every 22.5 days
  • Top authors: valiano (100%)

Code review

53 tests

User reviews

52 reviews

Install metrics

10,000+ active / 249,653 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼286.74ms] Passed 4 tests

An overview of server-side resources used by Unite Gallery Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.09 ▲0.2632.19 ▼0.11
Dashboard /wp-admin3.34 ▲0.2941.60 ▼0.26
Posts /wp-admin/edit.php3.39 ▲0.2837.05 ▼4.87
Add New Post /wp-admin/post-new.php5.70 ▲0.2796.08 ▼1,132.58
Media Library /wp-admin/upload.php3.28 ▲0.2734.03 ▼9.26
Settings /wp-admin/admin.php?page=unitegallery_settings3.3138.99
Items /wp-admin/admin.php?page=unitegallery_items3.3140.83
Galleries /wp-admin/admin.php?page=unitegallery3.3139.66

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 519 new files
Database: 3 new tables, 1 new option
New tables
wp_unitegallery_items
wp_unitegallery_categories
wp_unitegallery_galleries
New WordPress options
widget_unitegallery-widget

Browser metrics Passed 4 tests

Checking browser requirements for Unite Gallery Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,741 ▲13515.90 ▲0.439.03 ▼0.8043.44 ▼3.02
Dashboard /wp-admin2,998 ▲1455.93 ▲0.07136.12 ▲3.08108.47 ▲5.47
Posts /wp-admin/edit.php2,745 ▲422.69 ▲0.0166.28 ▲2.7487.59 ▼2.11
Add New Post /wp-admin/post-new.php1,876 ▼16217.45 ▼1.87350.41 ▼6.45105.82 ▼0.12
Media Library /wp-admin/upload.php1,811 ▲395.03 ▲0.01147.73 ▲10.54119.21 ▲2.19
Settings /wp-admin/admin.php?page=unitegallery_settings1,6574.5886.1469.27
Items /wp-admin/admin.php?page=unitegallery_items2,3934.8699.0477.74
Galleries /wp-admin/admin.php?page=unitegallery1,7744.1177.3696.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_unitegallery_categories
    • wp_unitegallery_items
    • wp_unitegallery_galleries
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_unitegallery-widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 142× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/unite-gallery-lite/helpers/settings/slider_main.php
    • > /wp-content/plugins/unite-gallery-lite/galleries/ugcore_tilesgrid/settings/gallery_options.php
    • > /wp-content/plugins/unite-gallery-lite/galleries/ugcore_tilesjustified/settings/gallery_settings.php
    • > /wp-content/plugins/unite-gallery-lite/inc_php/framework/translate.class.php
    • > /wp-content/plugins/unite-gallery-lite/helpers/templates/gallery_edit_buttons.php
    • > /wp-content/plugins/unite-gallery-lite/galleries/ugcore_tilesnested/views/preview.php
    • > /wp-content/plugins/unite-gallery-lite/galleries/ugcore_default/inc_php/output.class.php
    • > /wp-content/plugins/unite-gallery-lite/helpers/settings/categorytab_params.php
    • > /wp-content/plugins/unite-gallery-lite/galleries/ugcore_grid/scripts.php
    • > /wp-content/plugins/unite-gallery-lite/views/galleries.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/unite-gallery-lite/inc_php/framework/provider/functions_wordpress.class.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'UniteGalleryManager' not found in wp-content/plugins/unite-gallery-lite/inc_php/unitegallery_manager_main.class.php:9
    • > PHP Fatal error
      require_once(): Failed opening required '/inc_php/framework/provider/unitegallery_widget.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/unite-gallery-lite/inc_php/framework/provider/provider_main_file.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'UniteGalleryManager' not found in wp-content/plugins/unite-gallery-lite/inc_php/unitegallery_manager_inline.class.php:9
    • > PHP Notice
      Undefined variable: currentFolder in wp-content/plugins/unite-gallery-lite/inc_php/framework/provider/provider_main_file.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'UniteGallerySettingsUG' not found in wp-content/plugins/unite-gallery-lite/helpers/settings/position_tiles.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'UniteGallerySettingsUG' not found in wp-content/plugins/unite-gallery-lite/helpers/settings/position.php:2
    • > PHP Warning
      require_once(/inc_php/framework/provider/unitegallery_widget.class.php): failed to open stream: No such file or directory in wp-content/plugins/unite-gallery-lite/inc_php/framework/provider/provider_main_file.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'UniteGalleryAdmin' not found in wp-content/plugins/unite-gallery-lite/inc_php/framework/provider/provider_admin.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GlobalsUGGallery' not found in wp-content/plugins/unite-gallery-lite/views/items.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === unite-gallery-lite === )
  • Tags: There are too many tags (118 tag instead of maximum 10)
The official readme.txt might help

unite-gallery-lite/unitegallery.php 92% from 13 tests

The primary PHP file in "Unite Gallery Lite" version 1.7.54 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("unite-gallery-lite.php" instead of "unitegallery.php")

Code Analysis Passed 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
No dangerous file extensions were detected46,076 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5011,2106,62025,867
PHP1465,7873,57312,187
CSS221,0292344,537
XML43862173,266
SVG100213
INI2226

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity30.00
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes00.00%
▷ Concrete classes51100.00%
▷ Final classes00.00%
Methods822
▷ Static methods26432.12%
▷ Public methods53264.72%
▷ Protected methods15919.34%
▷ Private methods13115.94%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants155
▷ Global constants21.29%
▷ Class constants15398.71%
▷ Public constants153100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
140 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/update.png0.52KB0.55KB0.00%
images/trans_tile2.png0.27KB0.09KB▼ 65.59%
css/jui/new/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
js/fancybox/fancy_title_over.png0.07KB0.09KB0.00%
unitegallery-plugin/skins/default/arrows_strip_down.png0.15KB0.12KB▼ 20.53%