72% lr-youtube-grid-gallery

Code Review | LR YouTube Grid Gallery

WordPress plugin LR YouTube Grid Gallery scored 72% from 54 tests.

About plugin

  • Plugin page: lr-youtube-grid-g...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 22, 2018
  • Latest release: Mar 22, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 616 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.14MB] [CPU: ▼1.59ms] Passed 4 tests

A check of server-side resources used by LR YouTube Grid Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.96 ▼1.37
Dashboard /wp-admin3.45 ▲0.1450.59 ▲0.51
Posts /wp-admin/edit.php3.56 ▲0.2046.74 ▲2.75
Add New Post /wp-admin/post-new.php6.03 ▲0.1486.68 ▼6.75
Media Library /wp-admin/upload.php3.37 ▲0.1435.47 ▲1.27
LRYG Settings /wp-admin/edit.php?post_type=lr-youtube-gallery&page=lryg_settings3.3433.72
Add New /wp-admin/post-new.php?post_type=lr-youtube-gallery3.4145.91
Categories /wp-admin/edit-tags.php?taxonomy=youtube-category&post_type=lr-youtube-gallery3.3634.78
Videos /wp-admin/edit.php?post_type=lr-youtube-gallery3.4135.31

Server storage [IO: ▲0.67MB] [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: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LR YouTube Grid Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21413.63 ▼0.795.98 ▲3.6547.01 ▼3.52
Dashboard /wp-admin2,247 ▲625.81 ▲0.9195.83 ▼26.5638.71 ▼9.33
Posts /wp-admin/edit.php2,139 ▲502.05 ▲0.0533.55 ▼2.8135.94 ▲3.86
Add New Post /wp-admin/post-new.php1,548 ▲1517.62 ▼3.25737.28 ▲80.3253.34 ▲5.25
Media Library /wp-admin/upload.php1,435 ▲504.25 ▲0.0893.01 ▼9.0943.89 ▼2.32
LRYG Settings /wp-admin/edit.php?post_type=lr-youtube-gallery&page=lryg_settings9532.1027.3631.75
Add New /wp-admin/post-new.php?post_type=lr-youtube-gallery1,7642.6149.9150.71
Categories /wp-admin/edit-tags.php?taxonomy=youtube-category&post_type=lr-youtube-gallery1,3152.1825.7327.53
Videos /wp-admin/edit.php?post_type=lr-youtube-gallery1,0921.9731.4028.35

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/lr-youtube-grid-gallery/admin/tinymce/lryg-tinymce-page.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lr-youtube-grid-gallery/custom-taxonomy-lr-youtube-grid-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lr-youtube-grid-gallery/lr-youtube-grid-gallery.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lr-youtube-grid-gallery/custom-post-lr-youtube-grid-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lr-youtube-grid-gallery/content-list-lr-youtube-grid-gallery.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=lr-youtube-gallery
    • > Network (severe)
    data:image/png; - Failed to load resource: net::ERR_INVALID_URL

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Stable tag: No value
  • Screenshots: Please a description for screenshot #7 in lr-youtube-grid-gallery/assets to your readme.txt
The official readme.txt might help

lr-youtube-grid-gallery/lr-youtube-grid-gallery.php Passed 13 tests

The main PHP file in "LR YouTube Grid Gallery" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
115 characters long description:
LR YouTube Grid Gallery is a plugin you can create an area for YouTube videos quickly with management by shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,103 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS5191,938
PHP63110639
SVG100504
JavaScript10022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-youtube-32.png1.10KB1.30KB0.00%
images/icon-youtube-64.png1.33KB1.46KB0.00%
images/icon-youtube.png0.52KB0.61KB0.00%
admin/tinymce/icon-youtube.png1.10KB1.30KB0.00%