79% gallery-showcase

Code Review | Gallery Showcase for WordPress

WordPress plugin Gallery Showcase for WordPress scored79%from 54 tests.

About plugin

  • Plugin page: gallery-showcase
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 13
  • Update frequency: every 148.8 days
  • Top authors: techeshta (61.54%)alkesh7 (46.15%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,779 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.20MB] [CPU: ▼0.67ms] Passed 4 tests

This is a short check of server-side resources used by Gallery Showcase for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.97 ▼5.40
Dashboard /wp-admin3.49 ▲0.1853.23 ▼2.64
Posts /wp-admin/edit.php3.60 ▲0.2555.59 ▲2.58
Add New Post /wp-admin/post-new.php6.29 ▲0.40105.03 ▲13.34
Media Library /wp-admin/upload.php3.41 ▲0.1840.31 ▲2.77
All Showcases /wp-admin/edit.php?post_type=gs_layouts3.4642.09
Add New /wp-admin/post-new.php?post_type=gs_layouts3.8751.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gallery Showcase for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲16814.46 ▼0.1020.10 ▲17.9539.05 ▼7.78
Dashboard /wp-admin2,222 ▲425.62 ▲0.0489.91 ▼13.6241.62 ▼3.07
Posts /wp-admin/edit.php2,130 ▲271.98 ▼0.0438.29 ▲1.0236.28 ▲1.62
Add New Post /wp-admin/post-new.php1,562 ▲2723.29 ▲5.06621.14 ▼42.2958.18 ▼11.17
Media Library /wp-admin/upload.php1,433 ▲304.18 ▼0.04102.01 ▼9.6746.46 ▼1.92
All Showcases /wp-admin/edit.php?post_type=gs_layouts1,0941.9830.5329.42
Add New /wp-admin/post-new.php?post_type=gs_layouts16,5474.23293.6943.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=gs_layouts
    • > Notice in wp-content/plugins/gallery-showcase/includes/add_metaboxes.php+513
    Undefined index: nav_vert_off

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gallery-showcase/includes/register_posttypes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_meta_box() in wp-content/plugins/gallery-showcase/includes/admin_menu_funcitons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/gallery-showcase/includes/add_metaboxes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/gallery-showcase/includes/admin_notices.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: gallery showcase plugin, gallery shortcode, gallery, gallery showcase, gallery layouts...

gallery-showcase/gallery-showcase.php Passed 13 tests

The entry point to "Gallery Showcase for WordPress" version 1.0.9 is a PHP file that has certain tags in its header comment area
105 characters long description:
Gallery Showcase plugin allows you to manage, edit, design and create new galleries showcases or teasers.

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected10,831 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP87338553,811
CSS51321323,394
SVG1002,672
JavaScript65494669
LESS1321285

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity120.33
▷ Minimum class complexity1.00
▷ Maximum class complexity370.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods191
▷ Static methods42.09%
▷ Public methods5528.80%
▷ Protected methods13671.20%
▷ Private methods00.00%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/images/bg_fallback.png3.63KB0.30KB▼ 91.72%
assets/images/fancybox/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%
includes/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/images/slider_handles.png4.35KB1.52KB▼ 64.97%