84% image-gallery-horizontal

Code Review | Image Gallery Horizontal

WordPress plugin Image Gallery Horizontal scored84%from 54 tests.

About plugin

  • Plugin page: image-gallery-hor...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Jan 25, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: module.express (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.32ms] Passed 4 tests

An overview of server-side resources used by Image Gallery Horizontal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.08 ▲2.48
Dashboard /wp-admin3.39 ▲0.0546.31 ▼10.88
Posts /wp-admin/edit.php3.44 ▲0.0944.45 ▼3.54
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.56 ▲0.60
Media Library /wp-admin/upload.php3.32 ▲0.0934.80 ▼3.45
Add New /wp-admin/post-new.php?post_type=master_gallery_image3.4447.74
All Image /wp-admin/edit.php?post_type=master_gallery_image3.3634.74
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_ighb_slider-category&post_type=master_gallery_image3.3132.92
Gallery showcases /wp-admin/edit.php?post_type=master_gallery_image&page=responsive_gallery-hozizontal-bar-submenu-page3.2831.76

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Image Gallery Horizontal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18414.04 ▼0.2410.86 ▲9.1342.33 ▲2.47
Dashboard /wp-admin2,241 ▲495.83 ▲0.91101.11 ▼4.5039.12 ▼7.65
Posts /wp-admin/edit.php2,130 ▲412.03 ▲0.0433.57 ▼1.6532.89 ▲0.68
Add New Post /wp-admin/post-new.php1,565 ▲5123.43 ▲5.69655.73 ▼87.2353.10 ▼8.47
Media Library /wp-admin/upload.php1,423 ▲414.25 ▲0.0796.24 ▼0.0742.05 ▼2.04
Add New /wp-admin/post-new.php?post_type=master_gallery_image2,3297.66169.1564.70
All Image /wp-admin/edit.php?post_type=master_gallery_image1,1081.9630.4030.63
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_ighb_slider-category&post_type=master_gallery_image1,2832.1425.9028.04
Gallery showcases /wp-admin/edit.php?post_type=master_gallery_image&page=responsive_gallery-hozizontal-bar-submenu-page7932.1822.7526.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-gallery-horizontal/image-gallery-hozizontal.php:416
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-gallery-horizontal/ighb_gallery_admin_settings_center.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_post_thumbnail() in wp-content/plugins/image-gallery-horizontal/designs/design-1.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Designs Views from admin side), #2 (Catagroies shortcode)
You can take inspiration from this readme.txt

image-gallery-horizontal/image-gallery-hozizontal.php 92% from 13 tests

The primary PHP file in "Image Gallery Horizontal" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("image-gallery-horizontal.php" instead of "image-gallery-hozizontal.php")

Code Analysis Passed 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
There were no executable files found in this plugin5,271 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,3398044,736
PHP37450336
CSS22217199

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/t01.png1.58KB0.74KB▼ 53.49%
css/d17.png5.38KB3.32KB▼ 38.24%