84% imagelightbox

Code Review | imageLightbox

WordPress plugin imageLightbox scored84%from 54 tests.

About plugin

  • Plugin page: imagelightbox
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: Oct 8, 2016
  • Number of updates: 5
  • Update frequency: every 174.4 days
  • Top authors: bjornjohansen (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /14,647 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.52ms] Passed 4 tests

A check of server-side resources used by imageLightbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.56 ▲5.10
Dashboard /wp-admin3.32 ▲0.0151.13 ▲1.89
Posts /wp-admin/edit.php3.37 ▲0.0147.41 ▼4.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.25 ▲1.42
Media Library /wp-admin/upload.php3.24 ▲0.0136.28 ▼0.64

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

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

Browser metrics Passed 4 tests

A check of browser resources used by imageLightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.40 ▼1.239.83 ▲7.2244.80 ▲1.45
Dashboard /wp-admin2,198 ▲215.65 ▲0.1195.58 ▼5.8542.14 ▼0.85
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0135.30 ▼1.8533.64 ▼0.64
Add New Post /wp-admin/post-new.php1,536 ▲818.35 ▼4.72606.88 ▼101.5874.92 ▲9.27
Media Library /wp-admin/upload.php1,397 ▼34.17 ▲0.02102.04 ▼18.9749.78 ▲2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/imagelightbox/imagelightbox.php:36

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: lightweight, responsive, jquery, mobile, lightbox...

imagelightbox/imagelightbox.php Passed 13 tests

The main file in "imageLightbox" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Image Lightbox, Responsive and Touch‑friendly

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin309 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3384282
PHP1162126
CSS1001

PHP code Passed 2 tests

An overview 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.40
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 files were detected