78% youtube-post-search

Code Review | Youtube Video Search

WordPress plugin Youtube Video Search scored78%from 54 tests.

About plugin

  • Plugin page: youtube-post-search
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 12, 2012
  • Latest release: Jun 12, 2020
  • Number of updates: 122
  • Update frequency: every 25.2 days
  • Top authors: mauriya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.40ms] Passed 4 tests

Analyzing server-side resources used by Youtube Video Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.56 ▲4.07
Dashboard /wp-admin3.31 ▲0.0143.00 ▼4.57
Posts /wp-admin/edit.php3.36 ▲0.0142.89 ▼5.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.09 ▼7.95
Media Library /wp-admin/upload.php3.24 ▲0.0144.36 ▲11.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Youtube Video Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲18914.61 ▲0.2123.16 ▲21.5750.55 ▲6.65
Dashboard /wp-admin2,206 ▲265.52 ▼0.1385.61 ▼2.8274.79 ▲31.58
Posts /wp-admin/edit.php2,111 ▲111.95 ▼0.0436.68 ▲2.4734.94 ▼8.54
Add New Post /wp-admin/post-new.php1,689 ▲16322.43 ▼0.81750.76 ▲59.6661.45 ▲4.25
Media Library /wp-admin/upload.php1,411 ▲114.13 ▼0.03108.57 ▲5.9977.19 ▲23.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/youtube-post-search/setting/youtubekey.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: youtubekey in wp-content/plugins/youtube-post-search/setting/youtubekey.php on line 11
    • > PHP Notice
      Undefined variable: youtubenum in wp-content/plugins/youtube-post-search/setting/youtubekey.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-post-search/youtubepostsearch.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: youtube videos, video, youtube plugin, youtube search, youtube results...

youtube-post-search/youtubepostsearch.php 85% from 13 tests

The principal PHP file in "Youtube Video Search" v. 2.2.7 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("youtube-post-search.php" instead of "youtubepostsearch.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
No dangerous file extensions were detected310 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21924192
CSS142118

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dark.png5.40KB4.95KB▼ 8.30%
images/rating.png4.25KB3.23KB▼ 23.95%
images/youtube.png2.60KB1.41KB▼ 45.73%
images/comments.png5.18KB4.04KB▼ 22.03%
images/searchicon.png2.75KB1.62KB▼ 41.07%