84% simple-image-popup

Code Review | Simple Image Popup

WordPress plugin Simple Image Popup scored84%from 54 tests.

About plugin

  • Plugin page: simple-image-popup
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2020
  • Latest release: Jan 10, 2023
  • Number of updates: 39
  • Update frequency: every 26.6 days
  • Top authors: mrdigital (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /13,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.08ms] Passed 4 tests

An overview of server-side resources used by Simple Image Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.17 ▲3.14
Dashboard /wp-admin3.39 ▲0.0460.59 ▲0.44
Posts /wp-admin/edit.php3.51 ▲0.1549.17 ▲1.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.40 ▼17.62
Media Library /wp-admin/upload.php3.29 ▲0.0739.71 ▲5.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
sip_plugin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Image Popup: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲26414.76 ▲0.525.05 ▲3.3843.97 ▲3.37
Dashboard /wp-admin2,353 ▲1726.19 ▲0.52110.99 ▲11.3642.30 ▲0.35
Posts /wp-admin/edit.php2,275 ▲1753.30 ▲1.2946.83 ▲11.1631.76 ▼4.48
Add New Post /wp-admin/post-new.php1,704 ▲17824.60 ▲0.87585.33 ▼113.3129.88 ▼23.75
Media Library /wp-admin/upload.php1,418 ▲184.17 ▼0.0481.57 ▼25.4344.36 ▼2.41

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 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • sip_plugin_options
    • widget_recent-comments

Smoke tests 75% 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 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 fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-image-popup/js/index.php
    • > /wp-content/plugins/simple-image-popup/css/index.php
    • > /wp-content/plugins/simple-image-popup/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: alert, simple, lightbox, popup, image...

simple-image-popup/simple-image-popup.php Passed 13 tests

The main PHP script in "Simple Image Popup" version 2.4.0 is automatically included on every request by WordPress
49 characters long description:
Display a simple image in a lightbox on page load

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin789 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2526373
PHP215928323
JavaScript3262593

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin