89% wp-fancybox

Code Review | WordPress fancybox

WordPress plugin WordPress fancybox scored89%from 54 tests.

About plugin

  • Plugin page: wp-fancybox
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: Nov 1, 2022
  • Number of updates: 18
  • Update frequency: every 111.1 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /9,716 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.02MB] [CPU: ▼14.82ms] Passed 4 tests

Server-side resources used by WordPress fancybox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.21 ▼0.80
Dashboard /wp-admin3.34 ▼0.0142.73 ▼17.40
Posts /wp-admin/edit.php3.39 ▲0.0344.81 ▼9.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.15 ▼31.41
Media Library /wp-admin/upload.php3.26 ▲0.0332.72 ▼0.37
WP Fancybox /wp-admin/options-general.php?page=wp-fancybox-settings3.2330.94

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress fancybox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲14314.13 ▼0.228.23 ▲6.0636.58 ▼3.07
Dashboard /wp-admin2,213 ▲224.79 ▼0.1095.61 ▼9.3940.03 ▼6.09
Posts /wp-admin/edit.php2,093 ▲72.12 ▲0.1539.29 ▲0.1934.75 ▼2.21
Add New Post /wp-admin/post-new.php1,540 ▲1123.31 ▲4.95669.69 ▲21.8451.35 ▼0.74
Media Library /wp-admin/upload.php1,392 ▲14.24 ▼0.0098.38 ▼6.0441.70 ▼2.04
WP Fancybox /wp-admin/options-general.php?page=wp-fancybox-settings7592.0222.3823.90

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: fancybox, lightbox, gallery, image, photo

wp-fancybox/main.php 85% from 13 tests

"WordPress fancybox" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-fancybox.php" instead of "main.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin4,673 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,1806543,811
CSS213319744
PHP1511118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin