84% simple-fancybox

Code Review | Simple Fancybox

WordPress plugin Simple Fancybox scored84%from 54 tests.

About plugin

  • Plugin page: simple-fancybox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: May 12, 2019
  • Number of updates: 10
  • Update frequency: every 15.0 days
  • Top authors: damiroquai (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /2,757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.32ms] Passed 4 tests

Server-side resources used by Simple Fancybox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.48 ▼0.11
Dashboard /wp-admin3.32 ▼0.0345.27 ▼12.71
Posts /wp-admin/edit.php3.37 ▲0.0144.68 ▼4.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.82 ▼18.77
Media Library /wp-admin/upload.php3.24 ▲0.0132.32 ▼1.73

Server storage [IO: ▲0.25MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Fancybox: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.83 ▼0.468.01 ▲6.3840.57 ▲1.98
Dashboard /wp-admin2,209 ▲245.90 ▲0.00105.46 ▼1.7940.17 ▼3.03
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0139.90 ▼0.8435.58 ▼0.64
Add New Post /wp-admin/post-new.php1,548 ▲2018.39 ▲0.09602.17 ▼26.4563.23 ▲6.86
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.0498.32 ▲4.4345.34 ▲1.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-fancybox/simple-fancybox.php

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 uses markdown syntax to describe your plugin to the world
5 plugin tags: image, fancybox, popup, gallery, lightbox

simple-fancybox/simple-fancybox.php Passed 13 tests

The main PHP file in "Simple Fancybox" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
117 characters long description:
Simple Fancybox for WordPress image gallery. Works for both, shortcode gallery in classic editor and Gutengerg blocks

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
Everything looks great! No dangerous files found in this plugin4,583 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,1886543,807
CSS213218746
PHP2261130

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected