10% iw-magnific-popup

Code Review | IW Magnific Popup

WordPress plugin IW Magnific Popup scored10%from 54 tests.

About plugin

  • Plugin page: iw-magnific-popup
  • Plugin version: 1.3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: Feb 19, 2015
  • Number of updates: 44
  • Update frequency: every 26.3 days
  • Top authors: welshhuw (95.45%)bassgang (6.82%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /19,198 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/iw-magnific-popup/includes/conditionals.php+5
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.69ms] Passed 4 tests

This is a short check of server-side resources used by IW Magnific Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.88 ▼33.65
Dashboard /wp-admin2.11 ▼1.236.12 ▼56.62
Posts /wp-admin/edit.php2.12 ▼1.246.15 ▼44.45
Add New Post /wp-admin/post-new.php2.11 ▼3.777.21 ▼96.03
Media Library /wp-admin/upload.php2.12 ▼1.117.62 ▼23.05
IW Magnific Popup /wp-admin/options-general.php?page=iwmp-settings2.126.93

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

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

Browser metrics Passed 4 tests

IW Magnific Popup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.68 ▼0.615.42 ▲3.5739.30 ▼9.00
Dashboard /wp-admin2,213 ▲315.83 ▼0.20109.13 ▲8.1540.03 ▼1.66
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0339.31 ▼2.6334.62 ▼2.28
Add New Post /wp-admin/post-new.php1,538 ▲2423.07 ▲5.41646.58 ▼11.9675.37 ▲32.11
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.0193.09 ▼3.5741.03 ▼2.28
IW Magnific Popup /wp-admin/options-general.php?page=iwmp-settings8442.0625.6728.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/iw-magnific-popup/includes/conditionals.php+5
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=iwmp-settings
    • > Notice in wp-content/plugins/iw-magnific-popup/includes/plugin-settings-page-wrapper.php+46
    Trying to access array offset on value of type bool

SRP 50% from 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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iw-magnific-popup/includes/scripts.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iw-magnific-popup/includes/scripts.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_shortcode() in wp-content/plugins/iw-magnific-popup/includes/wp-gallery-shortcode-override.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iw-magnific-popup/includes/plugin-settings-page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/iw-magnific-popup/includes/conditionals.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: images, responsive, lightbox, gallery

iw-magnific-popup/iw-magnific-popup.php Passed 13 tests

The main file in "IW Magnific Popup" v. 1.3.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
89 characters long description:
A plugin to include the Magnific Popup lightbox for single & gallery images in WordPress.

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
There were no executable files found in this plugin807 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS100420
PHP6134102386
JavaScript1031

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected