78% youtube-video-sitemap-generator

Code Review | Youtube Video Sitemap generator

WordPress plugin Youtube Video Sitemap generator scored78%from 54 tests.

About plugin

  • Plugin page: youtube-video-sit...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2015
  • Latest release: May 19, 2015
  • Number of updates: 41
  • Update frequency: every 1.1 days
  • Top authors: vimes1984 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /16,155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.08ms] Passed 4 tests

This is a short check of server-side resources used by Youtube Video Sitemap generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.17 ▼3.72
Dashboard /wp-admin3.36 ▲0.0646.99 ▼4.09
Posts /wp-admin/edit.php3.48 ▲0.1247.42 ▼3.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.45 ▼4.81
Media Library /wp-admin/upload.php3.29 ▲0.0640.47 ▲2.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Youtube Video Sitemap generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.37 ▲0.021.56 ▼0.2342.72 ▼1.73
Dashboard /wp-admin2,211 ▲375.62 ▼0.0390.41 ▼7.3741.93 ▼2.06
Posts /wp-admin/edit.php2,116 ▲161.99 ▼0.0140.22 ▲2.3436.53 ▲1.50
Add New Post /wp-admin/post-new.php1,539 ▲1323.01 ▼0.66646.56 ▼21.4764.17 ▲8.60
Media Library /wp-admin/upload.php1,416 ▲164.11 ▼0.0896.07 ▼12.9644.13 ▼0.54

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/youtube-video-sitemap-generator/views/public.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'VideoSitemap' not found in wp-content/plugins/youtube-video-sitemap-generator/views/admin.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

youtube-video-sitemap-generator/video-sitemap.php 85% from 13 tests

"Youtube Video Sitemap generator" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("youtube-video-sitemap-generator.php" instead of "video-sitemap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin397 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6102242298
XSLT14068
JSON20010
JavaScript222610
CSS1018
Markdown1003

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.25
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods315.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin