83% easy-fancybox

Code Review | Easy FancyBox

WordPress plugin Easy FancyBox scored83%from 54 tests.

About plugin

  • Plugin page: easy-fancybox
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2010
  • Latest release: Oct 14, 2023
  • Number of updates: 517
  • Update frequency: every 9.3 days
  • Top authors: RavanH (89.56%)deployer (10.64%)

Code review

54 tests

User reviews

174 reviews

Install metrics

200,000+ active /4,441,492 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.39MB] [CPU: ▲11.90ms] Passed 4 tests

This is a short check of server-side resources used by Easy FancyBox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2857.68 ▲18.92
Dashboard /wp-admin3.74 ▲0.3970.21 ▲8.19
Posts /wp-admin/edit.php3.85 ▲0.4966.60 ▲16.94
Add New Post /wp-admin/post-new.php6.33 ▲0.4499.92 ▲3.54
Media Library /wp-admin/upload.php3.68 ▲0.4558.93 ▲28.45

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 164 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
easy_fancybox_version
widget_recent-posts

Browser metrics Passed 4 tests

Easy FancyBox: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.52 ▼0.8411.71 ▲10.0842.87 ▲0.61
Dashboard /wp-admin2,189 ▲125.65 ▼0.0291.96 ▼4.2340.32 ▼4.38
Posts /wp-admin/edit.php2,103 ▲62.01 ▼0.0139.90 ▲3.8235.37 ▼2.62
Add New Post /wp-admin/post-new.php1,535 ▲917.93 ▼5.17620.96 ▼1.7364.65 ▲9.98
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.0299.22 ▼4.3644.48 ▲2.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/easy-fancybox/views/settings-field-media.php:1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/easy-fancybox/views/admin-page.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/easy-fancybox/inc/fancybox-2-options.php:8
    • > PHP Warning
      include(): Failed opening 'EASY_FANCYBOX_DIR/views/settings-section-intro.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-fancybox/views/admin-page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-fancybox/inc/fancybox-legacy.php:333
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-fancybox/inc/fancybox-classic.php:335
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/easy-fancybox/inc/fancybox-classic-options.php:13
    • > PHP Warning
      Use of undefined constant EASY_FANCYBOX_DIR - assumed 'EASY_FANCYBOX_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-fancybox/views/admin-page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-fancybox/inc/fancybox-2.php:513
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/easy-fancybox/views/admin-page.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

easy-fancybox/easy-fancybox.php 85% from 13 tests

The entry point to "Easy FancyBox" version 1.9.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected29,928 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript405,4752,63318,140
PHP194505306,374
CSS235171183,101
HTML346381,867
Markdown31080323
JSON400123

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity60.67
▷ Minimum class complexity9.00
▷ Maximum class complexity97.00
Average method complexity6.40
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2184.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions1450.00%
▷ Anonymous functions1450.00%
Constants7
▷ Global constants7100.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
46 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/fancybox-1.3.4/fancy_title_main.png0.09KB0.14KB0.00%
fancybox/1.3.28/fancy_title_left.png0.49KB0.82KB0.00%
vendor/fancybox-1.3.4/fancy_shadow_sw.png0.33KB0.48KB0.00%
fancybox/2.2.0/fancybox_sprite.png1.33KB1.42KB0.00%
fancybox/2.2.0/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%