63% limb-gallery

Code Review | Limb Gallery | Create Beautiful Image & Video Galleries

WordPress plugin Limb Gallery | Create Beautiful Image & Video Galleries scored63%from 54 tests.

About plugin

  • Plugin page: limb-gallery
  • Plugin version: 1.5.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2016
  • Latest release: Jul 13, 2023
  • Number of updates: 209
  • Update frequency: every 11.9 days
  • Top authors: limbcode (95.22%)brandonfire (5.26%)

Code review

54 tests

User reviews

55 reviews

Install metrics

700+ active /32,292 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.42MB] [CPU: ▲23.23ms] 75% from 4 tests

A check of server-side resources used by Limb Gallery | Create Beautiful Image & Video Galleries
Please have a look at the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.42MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.24 ▲5.7875.02 ▲34.04
Dashboard /wp-admin9.26 ▲5.9676.84 ▲23.68
Posts /wp-admin/edit.php9.26 ▲5.9074.07 ▲20.50
Add New Post /wp-admin/post-new.php9.92 ▲4.04115.73 ▲14.70
Media Library /wp-admin/upload.php9.26 ▲6.0382.66 ▲45.56
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2661.60

Server storage [IO: ▲10.98MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 387 new files
Database: 8 new tables, 12 new options
New tables
wp_limb_gallery_settings
wp_limb_gallery_galleries
wp_limb_gallery_themes
wp_limb_gallery_albums
wp_limb_gallery_shortcodes
wp_limb_gallery_galleriescontent
wp_limb_gallery_albumscontent
wp_limb_gallery_comments
New WordPress options
theysaidso_admin_options
widget_recent-comments
fs_debug_mode
can_compress_scripts
widget_theysaidso_widget
fs_active_plugins
fs_accounts
widget_recent-posts
db_upgraded
LIMB_gallery_version
...

Browser metrics Passed 4 tests

Checking browser requirements for Limb Gallery | Create Beautiful Image & Video Galleries
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,866 ▲1,08015.78 ▲1.1161.37 ▲59.3034.52 ▼12.08
Dashboard /wp-admin2,218 ▲415.66 ▲0.0991.01 ▼10.4674.30 ▲29.05
Posts /wp-admin/edit.php2,136 ▲362.02 ▲0.0134.01 ▼4.4832.16 ▼1.72
Add New Post /wp-admin/post-new.php1,529 ▲322.34 ▼1.23684.38 ▼25.57174.15 ▲124.09
Media Library /wp-admin/upload.php1,426 ▲264.14 ▼0.10120.06 ▲15.0677.77 ▲29.59
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0931.6624.6729.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/limb-gallery/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 8 tables
    • wp_limb_gallery_settings
    • wp_limb_gallery_albums
    • wp_limb_gallery_galleries
    • wp_limb_gallery_themes
    • wp_limb_gallery_albumscontent
    • wp_limb_gallery_shortcodes
    • wp_limb_gallery_comments
    • wp_limb_gallery_galleriescontent
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_limb_gallery_thumbnail_widget
    • fs_accounts
    • fs_debug_mode
    • LIMB_gallery_act_status
    • db_upgraded
    • widget_recent-posts
    • LIMB_gallery_version
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'LIMB_Gallery' not found in wp-content/plugins/limb-gallery/frontend/controllers/Controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GRSGalleryAjax' not found in wp-content/plugins/limb-gallery/ajax/GRSComment.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/limb-gallery/js/localizations/frontend.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'LIMB_Gallery' not found in wp-content/plugins/limb-gallery/uploader/UploadHandler.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/limb-gallery/js/localizations/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'GRSGalleryAjax' not found in wp-content/plugins/limb-gallery/embed/GRSGalleryEmbed.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'LIMB_Gallery' not found in wp-content/plugins/limb-gallery/uploader/UploadHandler.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/limb-gallery/admin/controllers/LimbGalleryThumbnailWidgetController.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: video gallery, gallery, carousel, image gallery, best gallery plugin...

limb-gallery/gallery-rs.php 85% from 13 tests

The principal PHP file in "Limb Gallery | Create Beautiful Image & Video Galleries" v. 1.5.7 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("limb-gallery.php" instead of "gallery-rs.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 199 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
There were no executable files found in this plugin88,489 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
PHP1528,52718,12347,206
PO File258,39710,53817,353
CSS2487416213,167
HTML184285,019
JavaScript194531,0654,574
SVG1106927
JSON300243

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following 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.49
Average class complexity71.34
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes80
▷ Abstract classes22.50%
▷ Concrete classes7897.50%
▷ Final classes00.00%
Methods1,557
▷ Static methods20012.85%
▷ Public methods1,04867.31%
▷ Protected methods764.88%
▷ Private methods43327.81%
Functions100
▷ Named functions9999.00%
▷ Anonymous functions11.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
42 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/captcha/backgrounds/45-degree-fabric.png8.93KB4.93KB▼ 44.79%
images/admin/header.png6.42KB2.86KB▼ 55.46%
css/captcha/backgrounds/white-carbon.png2.54KB0.91KB▼ 64.15%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
js/colorpicker/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%