78% rio-video-gallery

Code Review | Rio Video Gallery

WordPress plugin Rio Video Gallery scored78%from 54 tests.

About plugin

  • Plugin page: rio-video-gallery
  • Plugin version: 2.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Dec 13, 2021
  • Number of updates: 127
  • Update frequency: every 23.0 days
  • Top authors: riosisgroup (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /18,450 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.02MB] [CPU: ▼20.09ms] Passed 4 tests

An overview of server-side resources used by Rio Video Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2140.62 ▲2.08
Dashboard /wp-admin3.40 ▲0.0534.02 ▼35.77
Posts /wp-admin/edit.php3.46 ▲0.1036.34 ▼11.71
Add New Post /wp-admin/post-new.php5.64 ▼0.2569.13 ▼28.43
Media Library /wp-admin/upload.php3.40 ▲0.1729.28 ▼4.45
Video Categories /wp-admin/edit-tags.php?taxonomy=video-categories&post_type=video-gallery3.3932.11
Add New /wp-admin/post-new.php?post_type=video-gallery3.4640.03
All Videos /wp-admin/edit.php?post_type=video-gallery3.4431.59
Settings /wp-admin/edit.php?post_type=video-gallery&page=video_gallery_settings3.3729.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_video_gallery
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Rio Video Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.42 ▼0.859.82 ▲8.2143.14 ▼1.57
Dashboard /wp-admin2,236 ▲595.57 ▼0.0886.50 ▼3.6439.62 ▼3.94
Posts /wp-admin/edit.php2,135 ▲351.95 ▼0.0634.48 ▲0.9035.53 ▲0.40
Add New Post /wp-admin/post-new.php1,557 ▲3123.82 ▲0.63625.32 ▼50.2862.01 ▲6.75
Media Library /wp-admin/upload.php1,438 ▲384.15 ▼0.0595.00 ▼13.0943.92 ▼2.71
Video Categories /wp-admin/edit-tags.php?taxonomy=video-categories&post_type=video-gallery1,3152.1326.8128.99
Add New /wp-admin/post-new.php?post_type=video-gallery2,9447.65169.58121.53
All Videos /wp-admin/edit.php?post_type=video-gallery1,4411.8931.2132.27
Settings /wp-admin/edit.php?post_type=video-gallery&page=video_gallery_settings1,4811.8229.9032.43

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_video_gallery
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=video-gallery&page=video_gallery_settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=video-gallery&page=video_gallery_settings
    • > Notice in wp-content/plugins/rio-video-gallery/rio-video-gallery.php+291
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/rio-video-gallery/includes/template/archive-video-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rio-video-gallery/rio-video-gallery.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: video, video gallery, dailymotion, youtube, embed videos...

rio-video-gallery/rio-video-gallery.php Passed 13 tests

The main PHP script in "Rio Video Gallery" version 2.3.6 is automatically included on every request by WordPress
109 characters long description:
A powerful video gallery management plugin that allows you to embed videos from YouTube, Vimeo & Dailymotion.

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
Success! There were no dangerous files found in this plugin1,910 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2271211,441
CSS1104408
JavaScript111761

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 2.02MB with 1.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
help/images/get-vimeo-id-1.png753.34KB270.52KB▼ 64.09%
help/images/Rio-video-add-new.png89.76KB29.91KB▼ 66.68%
help/images/get-dialymotion-id.png447.89KB215.78KB▼ 51.82%
help/images/Rio-video-gallery-settings-page.png35.39KB18.77KB▼ 46.95%
help/images/get-youtube-video-id.png387.46KB175.15KB▼ 54.80%