10% wp-related-video-search

Code Review | Wordpress Related Video Search

WordPress plugin Wordpress Related Video Search scored 10% from 54 tests.

About plugin

  • Plugin page: wp-related-video-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Apr 25, 2011
  • Latest release: Jun 30, 2012
  • Number of updates: 9
  • Update frequency: every 48.0 days
  • Top authors: jodacame (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,368 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-related-video-search/wp-related-video-search.php+106
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_realted_video_search_widget has a deprecated constructor

Server metrics [RAM: ▼0.02MB] [CPU: ▼287.65ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Related Video Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0452.85 ▲1.25
Dashboard /wp-admin3.42 ▲0.0134.29 ▲0.19
Posts /wp-admin/edit.php3.65 ▲0.0138.28 ▼0.60
Add New Post /wp-admin/post-new.php6.90 ▼0.0799.07 ▼1,147.10
Media Library /wp-admin/upload.php3.31 ▲0.0124.46 ▼3.09
Settings /wp-admin/admin.php?page=wp_realted_video_search_pagina_principal3.3422.30
About /wp-admin/admin.php?page=wp_realted_video_search_about3.3023.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Related Video Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲23216.49 ▲0.458.56 ▲2.262.57 ▲0.09
Dashboard /wp-admin2,933 ▲826.14 ▼0.02117.28 ▼16.92176.89 ▲15.44
Posts /wp-admin/edit.php2,730 ▲393.13 ▼0.1062.97 ▼4.27144.07 ▼14.84
Add New Post /wp-admin/post-new.php1,696 ▲2817.95 ▼0.67413.72 ▲30.47184.40 ▲27.53
Media Library /wp-admin/upload.php1,738 ▲375.50 ▲0.00124.20 ▼21.07206.62 ▲12.96
Settings /wp-admin/admin.php?page=wp_realted_video_search_pagina_principal1,2142.6654.51124.82
About /wp-admin/admin.php?page=wp_realted_video_search_about1,0652.6555.42115.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
Almost there, just fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_realted_video_search_pagina_principal
    • > Notice in wp-content/plugins/wp-related-video-search/includes/menu_principal.php+98
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/config.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-related-video-search/wp-related-video-search.php:106
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-content/plugins/wp-related-video-search/config.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-related-video-search/wp-related-video-search.php on line 13
    • > PHP Warning
      include(ABSPATHwp-content/plugins/wp-related-video-search/config.php): failed to open stream: No such file or directory in wp-content/plugins/wp-related-video-search/wp-related-video-search.php on line 13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/config.php on line 7
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/config.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/wp-related-video-search.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-related-video-search/includes/core/register.php:10
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/config.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-related-video-search/config.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots do not have images: #1 (Related Video), #2 (Related Video 2)
  • Requires at least: Version not formatted correctly
The official readme.txt might help

wp-related-video-search/wp-related-video-search.php Passed 13 tests

The main PHP script in "Wordpress Related Video Search" version 1.1 is automatically included on every request by WordPress
31 characters long description:
Show related video in your post

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
No dangerous file extensions were detected1,572 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114098829
CSS29562411
PHP129662332

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.62MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/about.png0.50KB0.25KB▼ 50.29%
images/titulo.png3.44KB1.47KB▼ 57.25%
images/icono.png1.61KB0.43KB▼ 73.17%
images/donate.png0.64KB0.64KB0.30%
images/widget.png0.33KB0.34KB0.00%