78% popup-with-fancybox

Code Review | Popup with fancybox

WordPress plugin Popup with fancybox scored78%from 54 tests.

About plugin

  • Plugin page: popup-with-fancybox
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2013
  • Latest release: Oct 29, 2023
  • Number of updates: 36
  • Update frequency: every 103.6 days
  • Top authors: gopiplus@hotmail.com (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /104,786 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.79ms] Passed 4 tests

An overview of server-side resources used by Popup with fancybox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.43 ▲0.50
Dashboard /wp-admin3.35 ▲0.0547.97 ▼1.40
Posts /wp-admin/edit.php3.41 ▲0.0545.13 ▼4.33
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.78 ▼7.61
Media Library /wp-admin/upload.php3.28 ▲0.0533.92 ▼5.82
Popup with fancybox /wp-admin/options-general.php?page=popup-with-fancybox3.2929.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: 1 new table, 8 new options
New tables
wp_popupwith_fancybox
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
Popupwfb_session
Popupwfb_group
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Popup with fancybox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲31813.47 ▼1.0913.64 ▲12.0444.54 ▼0.18
Dashboard /wp-admin2,202 ▲225.60 ▼0.0793.94 ▼3.7741.97 ▼1.78
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.1937.51 ▲0.3031.25 ▼4.31
Add New Post /wp-admin/post-new.php1,532 ▲423.13 ▲0.02657.14 ▼41.1154.99 ▼2.22
Media Library /wp-admin/upload.php1,407 ▲74.21 ▼0.0095.49 ▼12.3041.89 ▼2.27
Popup with fancybox /wp-admin/options-general.php?page=popup-with-fancybox9192.0022.6125.41

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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/popup-with-fancybox/pages/content-management-add.php
    • > /wp-content/plugins/popup-with-fancybox/pages/content-management-edit.php
    • > /wp-content/plugins/popup-with-fancybox/pages/content-setting.php
    • > /wp-content/plugins/popup-with-fancybox/pages/content-management-show.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/popup-with-fancybox/popup-with-fancybox.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/popup-with-fancybox/popup-with-fancybox.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: fancybox, plugin, popup

popup-with-fancybox/popup-with-fancybox.php 92% from 13 tests

The entry point to "Popup with fancybox" version 3.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 271 characters long)

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
Good job! No executable or dangerous file extensions detected3,222 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24551351,520
PHP610036885
PO File4236394568
CSS14218249

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/fancybox_sprite.png1.33KB1.42KB0.00%
inc/fancybox_overlay.png0.98KB0.09KB▼ 90.43%
inc/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%