84% image-gallery-box-by-crudlab

Code Review | Image Gallery Box by CRUDLab

WordPress plugin Image Gallery Box by CRUDLab scored 84% from 54 tests.

About plugin

  • Plugin page: image-gallery-box...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: May 13, 2016
  • Number of updates: 9
  • Update frequency: every 40.3 days
  • Top authors: amirk27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.51ms] Passed 4 tests

This is a short check of server-side resources used by Image Gallery Box by CRUDLab
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.73 ▲6.38
Dashboard /wp-admin3.37 ▲0.0747.50 ▼0.17
Posts /wp-admin/edit.php3.48 ▲0.1344.34 ▼6.74
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.42 ▼11.30
Media Library /wp-admin/upload.php3.29 ▲0.0635.86 ▲0.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 7 new options
New WordPress options
clgallerybox-options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Image Gallery Box by CRUDLab: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲26013.54 ▼1.039.06 ▲7.3641.45 ▲1.66
Dashboard /wp-admin2,227 ▲424.93 ▲0.0494.46 ▼15.4881.87 ▲40.36
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0233.28 ▼4.0732.11 ▲0.03
Add New Post /wp-admin/post-new.php1,531 ▲1123.19 ▲0.14742.37 ▲43.7154.45 ▼4.59
Media Library /wp-admin/upload.php1,409 ▲184.12 ▼0.0794.24 ▼6.6668.07 ▲21.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • clgallerybox-options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style1.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style4.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style3.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-gallery-box-by-crudlab/crudlab-gallerybox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style5.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style6.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-gallery-box-by-crudlab/popups/style2.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === image-gallery-box-by-crudlab === )
You can take inspiration from this readme.txt

image-gallery-box-by-crudlab/crudlab-gallerybox.php 92% from 13 tests

"Image Gallery Box by CRUDLab" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("image-gallery-box-by-crudlab.php" instead of "crudlab-gallerybox.php")

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
Success! There were no dangerous files found in this plugin40,308 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
SVG70028,312
CSS6563399,142
JSON2002,139
PHP84355422
JavaScript57266293

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity11.00
▷ Minimum class complexity10.00
▷ Maximum class complexity12.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.49MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/cgallery.png0.28KB0.32KB0.00%
img/1428427059_spotify-128.png3.88KB3.21KB▼ 17.23%
img/preview.png400.42KB92.49KB▼ 76.90%
img/crudlab-facebook-like-box.png33.96KB10.60KB▼ 68.80%
img/wp-tweet-pro.png39.58KB12.70KB▼ 67.90%