72% envira-gallery-lite

Code Review | Gallery Plugin for WordPress - Envira Photo Gallery

WordPress plugin Gallery Plugin for WordPress - Envira Photo Gallery scored72%from 54 tests.

About plugin

  • Plugin page: envira-gallery-lite
  • Plugin version: 1.8.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2014
  • Latest release: Nov 15, 2023
  • Number of updates: 290
  • Update frequency: every 12.4 days
  • Top authors: n7studios (33.45%)chrisakelley (25.17%)dimensionmedia (20.69%)griffinjt (20.69%)smub (1.38%)

Code review

54 tests

User reviews

1520 reviews

Install metrics

100,000+ active /5,004,942 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.51MB] [CPU: ▲7.77ms] 75% from 4 tests

A check of server-side resources used by Gallery Plugin for WordPress - Envira Photo Gallery
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,050.78ms on /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-addons)
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8040.39 ▼4.05
Dashboard /wp-admin5.08 ▲1.7757.20 ▲7.58
Posts /wp-admin/edit.php5.13 ▲1.7660.18 ▲13.78
Add New Post /wp-admin/post-new.php7.66 ▲1.77108.36 ▲14.19
Media Library /wp-admin/upload.php4.94 ▲1.7047.50 ▲13.78
Support /wp-admin/admin.php?page=envira-gallery-lite-support4.8939.06
Albums /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-albums5.00383.86
Addons /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-addons5.091,050.78
Add New /wp-admin/post-new.php?post_type=envira5.1259.60
About Us /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-about-us4.9343.50
Settings /wp-admin/edit.php?post_type=envira&page=envira-gallery-settings4.9351.54
All Galleries /wp-admin/edit.php?post_type=envira5.0148.16

Server storage [IO: ▲5.01MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 275 new files
Database: no new tables, 9 new options
New WordPress options
envira_gallery_review
db_upgraded
theysaidso_admin_options
envira_gallery_116
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
envira_gallery_121

Browser metrics Passed 4 tests

A check of browser resources used by Gallery Plugin for WordPress - Envira Photo Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11714.25 ▼0.261.70 ▼0.0041.51 ▼1.31
Dashboard /wp-admin2,259 ▲795.60 ▼0.0293.39 ▲6.3368.78 ▲26.42
Posts /wp-admin/edit.php2,164 ▲641.97 ▼0.0139.03 ▲1.1835.08 ▲2.00
Add New Post /wp-admin/post-new.php6,265 ▲4,73919.44 ▼3.53965.00 ▲320.2868.66 ▲17.76
Media Library /wp-admin/upload.php1,470 ▲674.10 ▼0.16103.78 ▲1.1475.38 ▲30.19
Support /wp-admin/admin.php?page=envira-gallery-lite-support1,0622.0125.2132.63
Albums /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-albums2,6582.1039.0366.12
Addons /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-addons2,2212.0043.4469.17
Add New /wp-admin/post-new.php?post_type=envira3,9945.34122.59119.10
About Us /wp-admin/edit.php?post_type=envira&page=envira-gallery-lite-about-us2,1611.8828.3381.09
Settings /wp-admin/edit.php?post_type=envira&page=envira-gallery-settings1,3151.9528.4245.96
All Galleries /wp-admin/edit.php?post_type=envira1,5722.3839.2445.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • envira_gallery_121
    • envira_gallery_116
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • envira_gallery_review
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=envira-gallery-lite-support
    • > Warning in wp-content/plugins/envira-gallery-lite/includes/admin/Envira_Lite_Support.php+196
    Use of undefined constant FILTER_VALIDATE_BOOL - assumed 'FILTER_VALIDATE_BOOL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=envira-gallery-lite-support
    • > Warning in wp-content/plugins/envira-gallery-lite/includes/admin/Envira_Lite_Support.php+196
    filter_var() expects parameter 2 to be int, string given

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-type.php on line 15
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php on line 40
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-code.php:14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php on line 19
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-type.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Envira_Gallery_Lite' not found in wp-content/plugins/envira-gallery-lite/includes/admin/partials/notifications.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/envira-gallery-lite/includes/admin/partials/metabox-gallery-settings.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'Envira_Gallery_Common_Admin' not found in wp-content/plugins/envira-gallery-lite/includes/admin/partials/header.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: photo gallery, gallery, wordpress gallery plugin, image gallery, best gallery plugin

envira-gallery-lite/envira-gallery-lite.php Passed 13 tests

"Gallery Plugin for WordPress - Envira Photo Gallery" version 1.8.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Envira Gallery is the best responsive WordPress gallery plugin. This is the Lite version.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin30,686 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP332,1374,3498,670
JavaScript431,7502,7537,669
PO File72,3862,8067,088
Sass14624166,249
SVG4814668
CSS125816342

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity39.76
▷ Minimum class complexity1.00
▷ Maximum class complexity237.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods282
▷ Static methods207.09%
▷ Public methods27798.23%
▷ Protected methods00.00%
▷ Private methods51.77%
Functions33
▷ Named functions2987.88%
▷ Anonymous functions412.12%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
81 PNG files occupy 1.28MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/features/slideshow-icon.png2.27KB2.38KB0.00%
assets/css/images/social@2x.png7.30KB2.41KB▼ 66.97%
assets/images/features/social-icon.png4.34KB4.56KB0.00%
assets/images/about/plugin-mi.png7.07KB4.09KB▼ 42.18%
assets/images/partners/shortpixel.png3.11KB2.74KB▼ 12.07%