68% lis-video-gallery

Code Review | Lis Video Gallery

WordPress plugin Lis Video Gallery scored68%from 54 tests.

About plugin

  • Plugin page: lis-video-gallery
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Apr 30, 2017
  • Number of updates: 13
  • Update frequency: every 6.5 days
  • Top authors: bublick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /738 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.80MB] [CPU: ▼31.78ms] Passed 4 tests

An overview of server-side resources used by Lis Video Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1938.55 ▼0.34
Dashboard /wp-admin3.16 ▼0.1923.39 ▼37.96
Posts /wp-admin/edit.php3.16 ▼0.2026.86 ▼17.44
Add New Post /wp-admin/post-new.php3.16 ▼2.7324.97 ▼61.75
Media Library /wp-admin/upload.php3.16 ▼0.0724.34 ▼9.98
Gallery /wp-admin/edit-tags.php?taxonomy=video_gallery&post_type=video3.1624.99
All Videos /wp-admin/edit.php?post_type=video3.1623.51
Add New /wp-admin/post-new.php?post_type=video3.1622.88
Video Gallery /wp-admin/options-general.php?page=video_gallery3.1624.85

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
lis_lvg_box
lis_lvg_source
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lis Video Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲13713.29 ▼1.021.97 ▲0.1150.33 ▼1.84
Dashboard /wp-admin2,246 ▲614.88 ▼0.97108.01 ▲2.9244.30 ▲3.55
Posts /wp-admin/edit.php2,129 ▲372.00 ▼0.0339.35 ▼0.1434.29 ▼0.81
Add New Post /wp-admin/post-new.php1,559 ▲2623.26 ▲0.28629.14 ▼26.6858.68 ▼0.55
Media Library /wp-admin/upload.php1,428 ▲434.20 ▼0.0198.74 ▼4.1142.38 ▲0.54
Gallery /wp-admin/edit-tags.php?taxonomy=video_gallery&post_type=video1,2962.1326.2333.21
All Videos /wp-admin/edit.php?post_type=video1,1311.9433.4031.05
Add New /wp-admin/post-new.php?post_type=video1,8463.7360.9733.40
Video Gallery /wp-admin/options-general.php?page=video_gallery9982.0222.8727.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 8 options
    • lis_lvg_box
    • lis_lvg_source
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=video_gallery
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/post-new.php?post_type=video
    • > Notice in wp-content/plugins/lis-video-gallery/lis_lvg_plugin_basic.php+188
    Undefined index: video_url_noncename

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lis-video-gallery/lis_lvg_short.php:199
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lis-video-gallery/lis_lvg_plugin_basic.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lis-video-gallery/lis_video_gallery.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === lis-video-gallery === )
Please take inspiration from this readme.txt

lis-video-gallery/lis_video_gallery.php 85% from 13 tests

Analyzing the main PHP file in "Lis Video Gallery" version 0.2.1
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("lis-video-gallery.php" instead of "lis_video_gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,514 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP532546745
CSS65930438
PO File2118122296
JavaScript4141835

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity6.00
▷ Minimum method complexity6.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods1100.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/cbox_loading_background.png0.13KB0.15KB0.00%
img/no_image.png19.26KB7.06KB▼ 63.34%
img/cbox_overlay.png0.11KB0.15KB0.00%
img/cbox_border.png0.07KB0.10KB0.00%
img/icon-128x128.png11.54KB7.07KB▼ 38.73%