90% gallery-and-lightbox

Code Review | Gallery and Lightbox

WordPress plugin Gallery and Lightbox scored90%from 54 tests.

About plugin

  • Plugin page: gallery-and-lightbox
  • Plugin version: 1.0.14
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: May 30, 2018
  • Latest release: Dec 31, 2019
  • Number of updates: 19
  • Update frequency: every 30.5 days
  • Top authors: ogulcanozugenc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,591 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by Gallery and Lightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.45 ▼3.15
Dashboard /wp-admin3.32 ▲0.0245.16 ▼4.15
Posts /wp-admin/edit.php3.37 ▲0.0250.21 ▲2.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.29 ▼4.67
Media Library /wp-admin/upload.php3.24 ▲0.0234.46 ▼4.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Gallery and Lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.71 ▼0.701.91 ▲0.0640.95 ▼11.36
Dashboard /wp-admin2,206 ▲185.91 ▲1.00108.88 ▲6.0546.22 ▲3.10
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0240.47 ▼0.1435.47 ▼0.35
Add New Post /wp-admin/post-new.php1,514 ▼517.63 ▼5.65654.48 ▼76.1566.46 ▲12.15
Media Library /wp-admin/upload.php1,382 ▼34.25 ▼0.01103.39 ▲1.0641.96 ▼6.05

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: gallery, lightbox, plugin, oulcan zgen, galeri...

gallery-and-lightbox/gallery-and-lightbox.php 92% from 13 tests

This is the main PHP file of "Gallery and Lightbox" version 1.0.14, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin186 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP11811110
CSS28071
JavaScript40105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin