83% bootstrap-multi-language-responsive-gallery

Code Review | Bootstrap Multi-language Responsive Gallery

WordPress plugin Bootstrap Multi-language Responsive Gallery scored83%from 54 tests.

About plugin

  • Plugin page: bootstrap-multi-l...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2015
  • Latest release: Jul 19, 2020
  • Number of updates: 10
  • Update frequency: every 196.4 days
  • Top authors: augustinfotech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲1.35ms] Passed 4 tests

Analyzing server-side resources used by Bootstrap Multi-language Responsive Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.43 ▲6.32
Dashboard /wp-admin3.47 ▲0.1751.50 ▼0.17
Posts /wp-admin/edit.php3.56 ▲0.2149.93 ▲1.89
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.92 ▼2.63
Media Library /wp-admin/upload.php3.39 ▲0.1645.39 ▲9.04
Add New Item /wp-admin/post-new.php?post_type=gallery3.5358.61
Gallery /wp-admin/edit.php?post_type=gallery3.4250.03
Gallery Settings /wp-admin/edit.php?post_type=gallery&page=gallery-settings3.3639.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 12 new options
New WordPress options
gallery_layout
db_upgraded
gallery_title
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
gallery_order
widget_theysaidso_widget
gallery_post_count
gallery_content
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap Multi-language Responsive Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲27414.19 ▼0.1612.27 ▲10.6149.72 ▲5.15
Dashboard /wp-admin2,246 ▲584.83 ▼0.05102.22 ▼1.1939.04 ▼3.03
Posts /wp-admin/edit.php2,123 ▲341.99 ▼0.0633.95 ▼7.2937.02 ▲0.04
Add New Post /wp-admin/post-new.php1,543 ▲117.59 ▼0.69685.27 ▲74.7654.28 ▲1.93
Media Library /wp-admin/upload.php1,422 ▲404.24 ▲0.04110.04 ▲9.9050.03 ▲7.70
Add New Item /wp-admin/post-new.php?post_type=gallery2,4847.62178.7367.92
Gallery /wp-admin/edit.php?post_type=gallery1,1381.9330.6631.93
Gallery Settings /wp-admin/edit.php?post_type=gallery&page=gallery-settings1,0042.1925.5940.50

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bootstrap-multi-language-responsive-gallery/gallery-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bootstrap-multi-language-responsive-gallery/gallery.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bootstrap-multi-language-responsive-gallery/content-gallery.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bootstrap-multi-language-responsive-gallery/template-gallery.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bootstrap-multi-language-responsive-gallery/wpt-posttype-gallery.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Two Column Gallery Page.), #2 (Gallery Colorbox.), #3 (Three Column Gallery Page.), #4 (Four Column Gallery Page.), #5 (Gallery Section Generated From Shortcode.), #6 (Gallery Listing In Admin Area.), #7 (Admin Settings.)
You can look at the official readme.txt

bootstrap-multi-language-responsive-gallery/gallery.php 85% from 13 tests

The entry point to "Bootstrap Multi-language Responsive Gallery" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bootstrap-multi-language-responsive-gallery.php" instead of "gallery.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin8,519 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS421266,058
JavaScript319484823
SVG200749
PHP523292576
HTML13354313

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 4.96MB with 3.68MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png379.46KB102.29KB▼ 73.04%
images/three-column.png3.23KB0.63KB▼ 80.54%
screenshot-4.png632.45KB160.16KB▼ 74.68%
screenshot-7.png83.75KB24.99KB▼ 70.17%
screenshot-6.png137.32KB37.14KB▼ 72.95%