79% image-projector

Code Review | Image Projector - a lightbox

WordPress plugin Image Projector - a lightbox scored79%from 54 tests.

About plugin

  • Plugin page: image-projector
  • Plugin version: 5.6.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: May 4, 2015
  • Latest release: Nov 12, 2023
  • Number of updates: 80
  • Update frequency: every 38.9 days
  • Top authors: wpgloe (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

30+ active /4,675 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼12.04ms] Passed 4 tests

A check of server-side resources used by Image Projector - a lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1433.30 ▼9.39
Dashboard /wp-admin3.60 ▲0.2943.39 ▼9.54
Posts /wp-admin/edit.php3.71 ▲0.3547.22 ▼1.54
Add New Post /wp-admin/post-new.php6.20 ▲0.3182.22 ▼27.68
Media Library /wp-admin/upload.php3.52 ▲0.2932.98 ▲1.69
Image Projector /wp-admin/options-general.php?page=wpiv-setting-admin3.4933.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
image_projector_admin
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
image_projector_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Projector - a lightbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,311 ▲56413.75 ▼0.6616.59 ▲14.7941.70 ▲1.97
Dashboard /wp-admin2,201 ▲245.63 ▼0.0592.12 ▼2.4339.01 ▲1.32
Posts /wp-admin/edit.php2,106 ▲61.95 ▼0.0036.68 ▼1.6633.91 ▼3.76
Add New Post /wp-admin/post-new.php1,541 ▲1523.06 ▼0.29666.41 ▲30.0053.20 ▲2.08
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.0897.15 ▲0.3440.62 ▼1.23
Image Projector /wp-admin/options-general.php?page=wpiv-setting-admin1,6672.5857.8228.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/image-projector/image-projector.php
    • > /wp-content/plugins/image-projector/includes/ip-core.php
    • > /wp-content/plugins/image-projector/includes/ip-settings.php
    • > /wp-content/plugins/image-projector/uninstall.php
  • 1× 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/image-projector/includes/wp-admin-tabbed-settings-pages.php:18

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: viewer, image, slide, lightbox, photo

image-projector/image-projector.php Passed 13 tests

The main file in "Image Projector - a lightbox" v. 5.6.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
The unique lightbox and image slider that also let you navigate between posts by image

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin6,548 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,2103933,791
PHP53911671,667
CSS210859698
PO File1123180302
SVG11090

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity127.00
▷ Minimum class complexity127.00
▷ Maximum class complexity127.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods5693.33%
▷ Protected methods00.00%
▷ Private methods46.67%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin