78% robo-gallery

Code Review | Photo Gallery, Images, Slider in Rbs Image Gallery

WordPress plugin Photo Gallery, Images, Slider in Rbs Image Gallery scored78%from 54 tests.

About plugin

  • Plugin page: robo-gallery
  • Plugin version: 3.2.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Nov 9, 2023
  • Number of updates: 1,402
  • Update frequency: every 2.2 days
  • Top authors: robosoft (100%)

Code review

54 tests

User reviews

386 reviews

Install metrics

50,000+ active /1,865,988 total downloads

Benchmarks

Plugin footprint 83% 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.30MB] [CPU: ▼6.73ms] Passed 4 tests

This is a short check of server-side resources used by Photo Gallery, Images, Slider in Rbs Image Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2641.09 ▼7.15
Dashboard /wp-admin3.61 ▲0.2750.27 ▼21.25
Posts /wp-admin/edit.php3.72 ▲0.3748.90 ▲0.55
Add New Post /wp-admin/post-new.php6.29 ▲0.4194.34 ▲0.95
Media Library /wp-admin/upload.php3.53 ▲0.3040.12 ▲3.88
Manage Galleries /wp-admin/edit.php?post_type=robo_gallery_table3.5939.74
Settings /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-settings3.5038.92
Support /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-support3.4834.44
Gallery Demo /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-demo3.4842.02
Overview /wp-admin/edit.php?post_type=robo_gallery_table&page=overview3.5444.28
Video Guides /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-guides3.4830.77
Add Gallery / Images /wp-admin/post-new.php?post_type=robo_gallery_table&showDialog=14.4284.41
Add-ons /wp-admin/edit.php?post_type=robo_gallery_table&page=robo_gallery_table-addons3.5632.62
Pro Version /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-gopro3.4833.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 853 new files
Database: no new tables, 11 new options
New WordPress options
RoboGalleryInstallVersion
photonic_options
widget_rbs_widget
theysaidso_admin_options
widget_recent-comments
rbs_gallery_db_version
db_upgraded
RoboGalleryInstallDate
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Photo Gallery, Images, Slider in Rbs Image Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13814.42 ▲0.471.62 ▼0.2833.08 ▼9.75
Dashboard /wp-admin2,280 ▲1006.11 ▲0.51114.30 ▲22.8374.16 ▲34.83
Posts /wp-admin/edit.php2,222 ▲1223.30 ▲1.3250.34 ▲15.1692.46 ▲57.80
Add New Post /wp-admin/post-new.php6,291 ▲4,75620.02 ▼5.21967.98 ▲362.1138.43 ▼19.78
Media Library /wp-admin/upload.php1,490 ▲875.70 ▲1.48129.18 ▲31.6188.09 ▲45.09
Manage Galleries /wp-admin/edit.php?post_type=robo_gallery_table1,2673.5852.7534.38
Settings /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-settings9332.9641.1028.18
Support /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-support2,9423.7692.24114.15
Gallery Demo /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-demo3,5973.3561.37116.69
Overview /wp-admin/edit.php?post_type=robo_gallery_table&page=overview1,0002.9762.5463.43
Video Guides /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-guides1,2134.1884.9336.93
Add Gallery / Images /wp-admin/post-new.php?post_type=robo_gallery_table&showDialog=17,2406.46310.51141.20
Add-ons /wp-admin/edit.php?post_type=robo_gallery_table&page=robo_gallery_table-addons1,0413.4152.0737.83
Pro Version /wp-admin/edit.php?post_type=robo_gallery_table&page=robo-gallery-gopro1,9142.5449.4494.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • RoboGalleryInstallVersion
    • theysaidso_admin_options
    • db_upgraded
    • rbs_gallery_db_version
    • photonic_options
    • widget_recent-comments
    • widget_rbs_widget
    • RoboGalleryInstallDate
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 29× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/text/slider.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/textarea/default.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/composite/default.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/text/default/llc4.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/metabox/default.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/checkbox/group.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/text/color.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/checkbox/group-switch.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/checkbox/switch/c3.tpl.php
    • > /wp-content/plugins/robo-gallery/app/extensions/fields/template/field/text/group.tpl.php
  • 558× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/robo-gallery/app/extensions/fields/template/field/checkbox/switch.tpl.php on line 14
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/robo-gallery/app/extensions/fields/template/field/custom/c2.tpl.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhpRBE\\ScssPhp\\Ast\\Sass\\Statement\\IfRuleClause' not found in wp-content/plugins/robo-gallery/vendor/scss/scssphp-1.10.0/src/Ast/Sass/Statement/ElseClause.php:20
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/robo-gallery/app/extensions/fields/template/field/checkbox/group-button.tpl.php on line 8
    • > PHP Warning
      include(ROBO_GALLERY_APP_EXTENSIONS_PATHgalleryType/themes/mosaic_1.php): failed to open stream: No such file or directory in wp-content/plugins/robo-gallery/app/extensions/galleryType/themes/mosaic.php on line 4
    • > PHP Warning
      Use of undefined constant ROBO_GALLERY_URL - assumed 'ROBO_GALLERY_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/robo-gallery/app/extensions/fields/template/content/gallery_type/type_mosaic.tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhpRBE\\ScssPhp\\Block' not found in wp-content/plugins/robo-gallery/vendor/scss/scssphp-1.10.0/src/Block/CallableBlock.php:21
    • > PHP Warning
      Use of undefined constant ROBO_GALLERY_APP_EXTENSIONS_PATH - assumed 'ROBO_GALLERY_APP_EXTENSIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/robo-gallery/app/app.php on line 38
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhpRBE\\ScssPhp\\Parser\\Parser' not found in wp-content/plugins/robo-gallery/vendor/scss/scssphp-1.10.0/src/Parser/MediaQueryParser.php:23
    • > PHP Notice
      Undefined variable: commercial in wp-content/plugins/robo-gallery/app/extensions/manager/templates/addon.tpl.php on line 7

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: gallery, photo gallery, image gallery, wordpress gallery plugin, responsive gallery

robo-gallery/robogallery.php 92% from 13 tests

The main PHP script in "Photo Gallery, Images, Slider in Rbs Image Gallery" version 3.2.17 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("robo-gallery.php" instead of "robogallery.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin93,131 lines of code in 639 files:
LanguageFilesBlank linesComment linesLines of code
PHP44912,01916,83342,912
JavaScript644,2212,39218,023
CSS381,47393516,062
SVG4124247,169
PO File92,2232,7374,802
HTML7165451,849
Markdown953301,574
JSON900391
Sass97636270
TypeScript15045
Pug215228
XML1156

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,458)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 195)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity24.89
▷ Minimum class complexity1.00
▷ Maximum class complexity1,458.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity195.00
Code structure
Namespaces25
Interfaces31
Traits0
Classes292
▷ Abstract classes134.45%
▷ Concrete classes27995.55%
▷ Final classes15053.76%
Methods2,762
▷ Static methods2207.97%
▷ Public methods1,78064.45%
▷ Protected methods32611.80%
▷ Private methods65623.75%
Functions201
▷ Named functions9848.76%
▷ Anonymous functions10351.24%
Constants177
▷ Global constants4726.55%
▷ Class constants13073.45%
▷ Public constants12293.85%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
28 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmbre2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
cmbre2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
images/admin/robo_gallery_icon.png7.25KB3.45KB▼ 52.36%
cmbre2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
cmbre2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%