88% wf-magnific-lightbox

Code Review | WF Magnific Lightbox

WordPress plugin WF Magnific Lightbox scored 88% from 53 tests.

About plugin

  • Plugin page: wf-magnific-lightbox
  • Plugin version: 0.9.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 5.8.1
  • First release: Jan 23, 2016
  • Latest release: Feb 19, 2019
  • Number of updates: 48
  • Update frequency: every 23.4 days
  • Top authors: wunderfarm (100%)

Code review

53 tests

User reviews

12 reviews

Install metrics

1,000+ active / 19,455 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by WF Magnific Lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.24 ▲9.94
Dashboard /wp-admin3.08 ▲0.0235.78 ▼9.56
Posts /wp-admin/edit.php3.13 ▲0.0240.81 ▼0.56
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.61 ▼1,102.34
Media Library /wp-admin/upload.php3.02 ▲0.0127.16 ▼12.12
WF Magnific Lightbox /wp-admin/options-general.php?page=wf-magnific-lightbox2.9928.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WF Magnific Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,798 ▲19216.26 ▲0.7713.36 ▲4.5549.35 ▲2.07
Dashboard /wp-admin2,935 ▲825.87 ▲0.02134.60 ▲2.2698.18 ▲1.61
Posts /wp-admin/edit.php2,708 ▲22.69 ▲0.0063.95 ▼5.5087.10 ▼2.69
Add New Post /wp-admin/post-new.php1,856 ▲20519.12 ▲1.90374.64 ▲16.10115.04 ▲5.18
Media Library /wp-admin/upload.php1,774 ▼14.99 ▼0.02152.15 ▼4.21108.91 ▼6.76
WF Magnific Lightbox /wp-admin/options-general.php?page=wf-magnific-lightbox1,0422.0954.0582.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wf-magnific-lightbox/wf-magnific-lightbox.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wf-magnific-lightbox/includes/wf_mlightbox_shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wf-magnific-lightbox/includes/wf_mlightbox_settings.php:212

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (WF Magnific Lightbox supports Title, Description and Copyright output), #2 (Uses existing copyright informations from EXIF-data already included in your photos), #3 (Multi-language Support for polylang-plugin from Chouby and the WPML-plugin from wpml.org), #4 (Truly responsive lightbox with css bases resizing)
You can look at the official readme.txt

wf-magnific-lightbox/wf-magnific-lightbox.php Passed 13 tests

This is the main PHP file of "WF Magnific Lightbox" version 0.9.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
111 characters long description:
WF Magnific Lightbox is the `wunderfarm-way` to show your images with wordpress in a truly responsive lightbox.

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
No dangerous file extensions were detected1,094 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File23438134

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 2.61MB with 1.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-512x512.png23.36KB11.98KB▼ 48.73%
screenshot-4.png273.25KB92.17KB▼ 66.27%
screenshot-1.png987.58KB301.35KB▼ 69.49%
screenshot-2.png492.78KB177.47KB▼ 63.99%
assets/banner-772x250.png9.83KB5.97KB▼ 39.25%