84% latest-youtube-video

Code Review | Latest YouTube Video

WordPress plugin Latest YouTube Video scored84%from 54 tests.

About plugin

  • Plugin page: latest-youtube-video
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: May 9, 2023
  • Number of updates: 5
  • Update frequency: every 30.4 days
  • Top authors: derekcodes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /533 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.35ms] Passed 4 tests

An overview of server-side resources used by Latest YouTube Video
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.85 ▼9.26
Dashboard /wp-admin3.32 ▼0.0344.45 ▼22.45
Posts /wp-admin/edit.php3.37 ▲0.0146.80 ▲3.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.56 ▼5.24
Media Library /wp-admin/upload.php3.25 ▲0.0133.65 ▼0.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Latest YouTube Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.201.74 ▼0.5545.62 ▲3.72
Dashboard /wp-admin2,206 ▲185.99 ▲1.08114.09 ▼2.9840.71 ▼5.38
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.26 ▲1.0033.80 ▼1.94
Add New Post /wp-admin/post-new.php1,533 ▲123.13 ▼0.61666.90 ▲7.0553.97 ▼4.84
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.1095.10 ▼2.0841.66 ▼2.78

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-youtube-video/latest-youtube-video.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (What does the end result look like?)
You can look at the official readme.txt

latest-youtube-video/latest-youtube-video.php Passed 13 tests

The main PHP file in "Latest YouTube Video" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
Get the latest YouTube Video for any Channel using a WordPress shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191882

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions2
▷ Named functions2100.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
1 PNG file occupies 1.07MB with 0.56MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1,097.84KB519.86KB▼ 52.65%