72% popup-lightbox

Code Review | Popup Lightbox

WordPress plugin Popup Lightbox scored72%from 54 tests.

About plugin

  • Plugin page: popup-lightbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6.2
  • WordPress version: 6.3.1
  • First release: May 11, 2012
  • Latest release: Sep 3, 2013
  • Number of updates: 13
  • Update frequency: every 37.0 days
  • Top authors: ramonvic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /7,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.60MB] [CPU: ▼15.46ms] Passed 4 tests

An overview of server-side resources used by Popup Lightbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0749.01 ▲5.54
Dashboard /wp-admin3.44 ▲0.0952.76 ▲2.25
Posts /wp-admin/edit.php3.56 ▲0.1549.74 ▼4.06
Add New Post /wp-admin/post-new.php3.29 ▼2.6444.14 ▼57.24
Media Library /wp-admin/upload.php3.36 ▲0.0938.34 ▼2.79
Todas Popups /wp-admin/edit.php?post_type=popup-lightbox3.4136.94
Sobre /wp-admin/edit.php?post_type=popup-lightbox&page=popup-lightbox-about3.3333.35
Adicionar Nova /wp-admin/post-new.php?post_type=popup-lightbox3.2937.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Popup Lightbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.58 ▲0.232.62 ▲0.5344.25 ▼1.27
Dashboard /wp-admin2,214 ▲445.59 ▼0.0796.49 ▼2.2480.15 ▲34.48
Posts /wp-admin/edit.php2,137 ▲372.00 ▼0.0134.31 ▼2.2933.08 ▼5.89
Add New Post /wp-admin/post-new.php1,572 ▲4423.32 ▲0.14696.00 ▲14.3380.73 ▲16.21
Media Library /wp-admin/upload.php1,428 ▲284.14 ▲0.0298.29 ▼15.9462.56 ▲12.96
Todas Popups /wp-admin/edit.php?post_type=popup-lightbox1,1111.9234.2332.93
Sobre /wp-admin/edit.php?post_type=popup-lightbox&page=popup-lightbox-about8051.9927.5726.40
Adicionar Nova /wp-admin/post-new.php?post_type=popup-lightbox1,8974.0171.2884.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=popup-lightbox&page=popup-lightbox-about
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+186
    Undefined index: pl
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+187
    Undefined index: one-time
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+195
    Undefined index: type
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+347
    Undefined index: popup_expirar
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+324
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+324
    Undefined index: popup_video
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+279
    Undefined index: popup_one-time
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+284
    Undefined index: popup_freguencia
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+308
    Undefined index: popup_image
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Notice in wp-content/plugins/popup-lightbox/popup-lightbox.php+312
    Undefined index: popup_image_link

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/popup-lightbox/includes/meta-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/popup-lightbox/popup-lightbox.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=popup-lightbox:475:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=popup-lightbox
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in popup-lightbox/assets to your readme.txt
You can look at the official readme.txt

popup-lightbox/popup-lightbox.php 85% from 13 tests

The main PHP script in "Popup Lightbox" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.5" instead of "3.5.1")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,588 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42952441,794
PHP28915436
PO File3135138315
CSS24943

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.41
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/controls.png1.59KB1.67KB0.00%