62% photo-gallery

Code Review | Photo Gallery by 10Web - Mobile-Friendly Image Gallery

WordPress plugin Photo Gallery by 10Web - Mobile-Friendly Image Gallery scored 62% from 54 tests.

About plugin

  • Plugin page: photo-gallery
  • Plugin version: 1.8.18
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Aug 17, 2023
  • Number of updates: 781
  • Update frequency: every 4.5 days
  • Top authors: webdorado (72.98%)10web (27.14%)

Code review

54 tests

User reviews

1514 reviews

Install metrics

200,000+ active / 17,267,922 total downloads

Benchmarks

Plugin footprint 65% 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: ▲2.47MB] [CPU: ▲17.70ms] Passed 4 tests

An overview of server-side resources used by Photo Gallery by 10Web - Mobile-Friendly Image Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.73 ▲2.2776.97 ▲34.62
Dashboard /wp-admin5.84 ▲2.5365.20 ▲14.67
Posts /wp-admin/edit.php5.96 ▲2.6168.23 ▲22.48
Add New Post /wp-admin/post-new.php8.40 ▲2.52104.37 ▲5.91
Media Library /wp-admin/upload.php5.79 ▲2.5661.07 ▲27.73
Add-ons /wp-admin/admin.php?page=addons_bwg5.7349.14
Global Settings /wp-admin/admin.php?page=options_bwg8.0766.92
Themes /wp-admin/admin.php?page=themes_bwg7.6256.40
Gallery Groups /wp-admin/admin.php?page=albums_bwg6.0551.32
Add Galleries/Images /wp-admin/admin.php?page=galleries_bwg6.5562.42
Cloudflare CDN /wp-admin/admin.php?page=cloudflare_bwg5.8253.06
Tags /wp-admin/edit-tags.php?taxonomy=bwg_tag5.7557.33
Speed & Image Optimization /wp-admin/admin.php?page=twbbwg_photo-gallery5.9351.82
Generate Shortcode /wp-admin/admin.php?page=shortcode_bwg8.2464.43
Uninstall /wp-admin/admin.php?page=uninstall_bwg5.8951.48

Server storage [IO: ▲22.97MB] [DB: ▲0.06MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 716 new files
Database: 10 new tables, 10 new options
New tables
wp_bwg_album
wp_bwg_image
wp_bwg_image_rate
wp_bwg_gallery
wp_bwg_image_comment
wp_bwg_theme
wp_bwg_file_paths
wp_bwg_image_tag
wp_bwg_album_gallery
wp_bwg_shortcode
New WordPress options
twb_images_total_size
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
bwg_admin_notice
widget_bwp_gallery
db_upgraded
widget_bwp_gallery_slideshow
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Photo Gallery by 10Web - Mobile-Friendly Image Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲1,05515.04 ▲0.2941.37 ▲39.7296.52 ▲56.61
Dashboard /wp-admin2,317 ▲1295.08 ▲0.20101.06 ▼6.8383.37 ▲42.00
Posts /wp-admin/edit.php2,753 ▲6672.33 ▲0.2967.58 ▲29.6138.65 ▲7.19
Add New Post /wp-admin/post-new.php6,541 ▲5,02723.65 ▲6.04875.06 ▲191.9348.79 ▼13.57
Media Library /wp-admin/upload.php1,496 ▲1084.24 ▲0.04100.65 ▼7.0597.40 ▲51.15
Add-ons /wp-admin/admin.php?page=addons_bwg9581.7328.1134.61
Global Settings /wp-admin/admin.php?page=options_bwg10,3333.1982.25242.99
Themes /wp-admin/admin.php?page=themes_bwg1,3012.1831.2458.19
Gallery Groups /wp-admin/admin.php?page=albums_bwg1,5702.4945.5677.04
Add Galleries/Images /wp-admin/admin.php?page=galleries_bwg1,5752.3051.1961.80
Cloudflare CDN /wp-admin/admin.php?page=cloudflare_bwg1,1662.0825.0944.96
Tags /wp-admin/edit-tags.php?taxonomy=bwg_tag1,3482.1731.4332.79
Speed & Image Optimization /wp-admin/admin.php?page=twbbwg_photo-gallery1,2762.2432.5564.24
Generate Shortcode /wp-admin/admin.php?page=shortcode_bwg8,7962.5892.3376.30
Uninstall /wp-admin/admin.php?page=uninstall_bwg1,1412.1629.8433.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables detected upon uninstall: 10 tables
    • wp_bwg_theme
    • wp_bwg_shortcode
    • wp_bwg_image_tag
    • wp_bwg_file_paths
    • wp_bwg_gallery
    • wp_bwg_image_rate
    • wp_bwg_image_comment
    • wp_bwg_album
    • wp_bwg_image
    • wp_bwg_album_gallery
  • This plugin does not fully uninstall, leaving 11 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_bwp_gallery_slideshow
    • twb_images_total_size
    • widget_recent-posts
    • twb_speed_score
    • widget_theysaidso_widget
    • widget_bwp_gallery
    • widget_recent-comments
    • bwg_admin_notice
    • ...

Smoke tests 25% 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
Please take a closer look at the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/photo-gallery/filemanager/UploadHandler.php
    • > /wp-content/plugins/photo-gallery/admin/views/AdminView.php
    • > /wp-content/plugins/photo-gallery/framework/BWGOptions.php
    • > /wp-content/plugins/photo-gallery/framework/WD_BWG_Theme.php
    • > /wp-content/plugins/photo-gallery/photo-gallery.php
  • 77× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/photo-gallery/admin/controllers/elementorWidget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' not found in wp-content/plugins/photo-gallery/library/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PhpZip\\Exception\\ZipException' not found in wp-content/plugins/photo-gallery/library/vendor/nelexa/zip/src/Exception/ZipEntryNotFoundException.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpZip\\Model\\Extra\\ZipExtraField' not found in wp-content/plugins/photo-gallery/library/vendor/nelexa/zip/src/Model/Extra/Fields/WinZipAesExtraField.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpZip\\Model\\Extra\\ZipExtraField' not found in wp-content/plugins/photo-gallery/library/vendor/nelexa/zip/src/Model/Extra/Fields/UnrecognizedExtraField.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BWG() in wp-content/plugins/photo-gallery/framework/howto/howto.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpZip\\Model\\Extra\\ZipExtraField' not found in wp-content/plugins/photo-gallery/library/vendor/nelexa/zip/src/Model/Extra/Fields/OldUnixExtraField.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'PhpZip\\Exception\\ZipException' not found in wp-content/plugins/photo-gallery/library/vendor/nelexa/zip/src/Exception/Crc32Exception.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'BWGViewSite' not found in wp-content/plugins/photo-gallery/frontend/views/BWGViewThumbnails_masonry.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AdminView_bwg' not found in wp-content/plugins/photo-gallery/admin/views/Galleries.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_bwg
    • > Console-api (warning) in wp-content/plugins/photo-gallery/js/jquery.jscolor.js?ver=2.4.8+94:13
    Installation using class name is DEPRECATED. Use data-jscolor=\"\" attribute instead. See https://jscolor.com/docs/

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

photo-gallery/photo-gallery.php 92% from 13 tests

"Photo Gallery by 10Web - Mobile-Friendly Image Gallery" version 1.8.18's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 254 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin242,124 lines of code in 495 files:
LanguageFilesBlank linesComment linesLines of code
PO File5166,747109,281154,369
PHP2074,16211,80447,897
JavaScript332,1682,98320,228
CSS312,05826414,741
SVG1534821,711
Markdown721301,689
Sass121901,049
JSON600392
HTML34024
XML10019
Bourne Shell1203
INI1002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 298)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity34.62
▷ Minimum class complexity1.00
▷ Maximum class complexity732.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity298.00
Code structure
Namespaces20
Interfaces17
Traits0
Classes174
▷ Abstract classes21.15%
▷ Concrete classes17298.85%
▷ Final classes116.40%
Methods1,531
▷ Static methods22714.83%
▷ Public methods1,38290.27%
▷ Protected methods885.75%
▷ Private methods613.98%
Functions31
▷ Named functions825.81%
▷ Anonymous functions2374.19%
Constants191
▷ Global constants31.57%
▷ Class constants18898.43%
▷ Public constants188100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
116 PNG files occupy 8.26MB with 4.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upgrade_to_pro_blog_style.png1,128.35KB346.88KB▼ 69.26%
images/wp-widget.png13.17KB8.11KB▼ 38.38%
images/effects/active.png0.92KB0.08KB▼ 91.12%
wd/assets/img/gawd_main_plugin.png11.42KB5.46KB▼ 52.18%
images/effects/option.png1.36KB0.79KB▼ 42.00%