68% woowgallery

Code Review | WoowGallery - image gallery / content gallery / ecommerce gallery / social gallery / video gallery / album photo gallery

WordPress plugin WoowGallery - image gallery / content gallery / ecommerce gallery / social gallery / video gallery / album photo gallery scored68%from 54 tests.

About plugin

  • Plugin page: woowgallery
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2020
  • Latest release: Jul 5, 2023
  • Number of updates: 48
  • Update frequency: every 23.6 days
  • Top authors: pasyuk (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /15,340 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.87MB] [CPU: ▲3.23ms] Passed 4 tests

Analyzing server-side resources used by WoowGallery - image gallery / content gallery / ecommerce gallery / social gallery / video gallery / album photo gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7345.10 ▲9.29
Dashboard /wp-admin4.23 ▲0.9255.49 ▲8.86
Posts /wp-admin/edit.php4.27 ▲0.9155.42 ▲8.16
Add New Post /wp-admin/post-new.php7.02 ▲1.1395.62 ▼10.47
Media Library /wp-admin/upload.php4.15 ▲0.9239.51 ▲6.36
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.4740.38
Media Tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment4.1441.51
Settings /wp-admin/edit.php?post_type=woowgallery&page=woowgallery-settings4.3944.33

Server storage [IO: ▲6.50MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 379 new files
Database: no new tables, 13 new options
New WordPress options
fs_active_plugins
woowgallery_version
can_compress_scripts
widget_theysaidso_widget
fs_accounts
widget_recent-comments
fs_debug_mode
theysaidso_admin_options
db_upgraded
woowgallery_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WoowGallery - image gallery / content gallery / ecommerce gallery / social gallery / video gallery / album photo gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.52 ▼1.175.29 ▲3.5533.86 ▼6.57
Dashboard /wp-admin2,299 ▲1075.80 ▲0.8596.08 ▼6.6537.55 ▼3.32
Posts /wp-admin/edit.php2,181 ▲922.03 ▲0.0341.42 ▲0.1938.48 ▲3.59
Add New Post /wp-admin/post-new.php6,336 ▲4,82226.98 ▲9.37920.34 ▲260.4238.48 ▼23.34
Media Library /wp-admin/upload.php1,488 ▲974.28 ▼0.0397.73 ▼4.7344.73 ▼0.43
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1521.7326.0229.32
Media Tags /wp-admin/edit-tags.php?taxonomy=media_tag&post_type=attachment1,3292.3127.6130.73
Settings /wp-admin/edit.php?post_type=woowgallery&page=woowgallery-settings1,1133.8173.6657.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/woowgallery/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_debug_mode
    • fs_active_plugins
    • widget_recent-comments
    • woowgallery_options
    • can_compress_scripts
    • woowgallery_install_date
    • widget_woowgallery
    • woowgallery_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 40× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/woowgallery/includes/class-lightbox.php
    • > /wp-content/plugins/woowgallery/includes/admin/class-edit-modal.php
    • > /wp-content/plugins/woowgallery/includes/admin/class-gutenberg.php
    • > /wp-content/plugins/woowgallery/includes/class-taxonomies.php
    • > /wp-content/plugins/woowgallery/includes/admin/templates/modal-edit-form-advanced.php
    • > /wp-content/plugins/woowgallery/includes/admin/class-media-library.php
    • > /wp-content/plugins/woowgallery/includes/admin/class-admin.php
    • > /wp-content/plugins/woowgallery/includes/class-rest-routes.php
    • > /wp-content/plugins/woowgallery/includes/tools/proxy.php
    • > /wp-content/plugins/woowgallery/includes/class-assets.php
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woowgallery/includes/admin/templates/settings.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woowgallery/includes/admin/templates/gallery-media-view.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woowgallery/includes/admin/templates/settings.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woowgallery/includes/admin/templates/gallery-media-edit.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woowgallery/includes/admin/templates/settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woowgallery_get_post_types() in wp-content/plugins/woowgallery/includes/admin/templates/query-wp.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_reset_vars() in wp-content/plugins/woowgallery/includes/admin/templates/modal-edit.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woowgallery/includes/admin/templates/gallery-media.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WoowGallery\\Admin\\Admin' not found in wp-content/plugins/woowgallery/includes/admin/templates/gallery-skin-config.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woowgallery/includes/admin/templates/gallery-media-bulk-edit.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: A description for screenshot #8 is missing in woowgallery/assets to your readme.txt
You can look at the official readme.txt

woowgallery/woowgallery.php 92% from 13 tests

The principal PHP file in "WoowGallery - image gallery / content gallery / ecommerce gallery / social gallery / video gallery / album photo gallery" v. 1.2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 166 characters long)

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 detected76,504 lines of code in 293 files:
LanguageFilesBlank linesComment linesLines of code
PHP1899,82720,98443,361
JavaScript544,2714,54228,964
Sass1559253,209
CSS284478963
SVG7007

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity59.78
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes91
▷ Abstract classes66.59%
▷ Concrete classes8593.41%
▷ Final classes00.00%
Methods1,573
▷ Static methods24115.32%
▷ Public methods1,15173.17%
▷ Protected methods382.42%
▷ Private methods38424.41%
Functions160
▷ Named functions13584.38%
▷ Anonymous functions2515.62%
Constants190
▷ Global constants10555.26%
▷ Class constants8544.74%
▷ Public constants85100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/spreadsheet.png2.87KB2.71KB▼ 5.35%
assets/images/icons/pdf.png3.77KB3.77KB0.03%
skins/parallax/screenshot.png21.39KB20.22KB▼ 5.47%
assets/images/icons/interactive.png3.41KB3.25KB▼ 4.50%
assets/images/icons/code.png2.97KB2.97KB0.00%