89% chroma-lightbox

Code Review | Chroma Lightbox

WordPress plugin Chroma Lightbox scored89%from 54 tests.

About plugin

  • Plugin page: chroma-lightbox
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 6
  • Update frequency: every 19.7 days
  • Top authors: soojooko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /694 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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.07ms] Passed 4 tests

This is a short check of server-side resources used by Chroma Lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.98 ▲3.26
Dashboard /wp-admin3.42 ▲0.0747.55 ▼15.53
Posts /wp-admin/edit.php3.54 ▲0.1850.79 ▲0.02
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.35 ▼20.04
Media Library /wp-admin/upload.php3.35 ▲0.1141.89 ▲5.90
Chroma Lightbox /wp-admin/options-general.php?page=chroma_lightbox_settings3.3540.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chroma Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲22113.52 ▼0.7512.06 ▲10.1338.47 ▼4.94
Dashboard /wp-admin2,199 ▲225.63 ▼0.0490.36 ▲1.9139.66 ▼1.88
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0238.47 ▲1.4436.06 ▲0.02
Add New Post /wp-admin/post-new.php1,531 ▲523.18 ▲0.08665.66 ▼12.4961.22 ▼2.59
Media Library /wp-admin/upload.php1,404 ▲74.26 ▲0.0798.35 ▼5.4145.18 ▼5.18
Chroma Lightbox /wp-admin/options-general.php?page=chroma_lightbox_settings1,5003.6880.4137.10

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

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

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: image load, gallery view, dynamic, lightbox, image view...

chroma-lightbox/chroma_lightbox.php 85% from 13 tests

"Chroma Lightbox" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chroma-lightbox.php" instead of "chroma_lightbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,460 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
Sass47632471
JavaScript417627469
PHP9174145413
CSS210107

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.25
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/slideshow-arrows.png1.46KB1.53KB0.00%
public/images/spinner.png1.14KB1.20KB0.00%