84% optimize-youtube-video

Code Review | Optimize Youtube Video

WordPress plugin Optimize Youtube Video scored84%from 54 tests.

About plugin

  • Plugin page: optimize-youtube-...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2022
  • Latest release: Oct 14, 2022
  • Number of updates: 93
  • Update frequency: every 1.0 days
  • Top authors: jundellagbo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Optimize Youtube Video
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.49 ▼2.59
Dashboard /wp-admin3.31 ▲0.0048.07 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0052.18 ▲7.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.42 ▲4.68
Media Library /wp-admin/upload.php3.23 ▲0.0035.44 ▲2.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Optimize Youtube Video
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.37 ▼0.181.63 ▼0.3046.39 ▲6.17
Dashboard /wp-admin2,195 ▲185.60 ▲0.0688.66 ▼2.7540.05 ▼4.75
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0439.81 ▲1.8136.25 ▲0.00
Add New Post /wp-admin/post-new.php1,526 ▼023.45 ▲0.31617.28 ▼47.8550.04 ▲5.54
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.04100.83 ▼7.5745.22 ▲0.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/optimize-youtube-video/functions.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: youtube, videos, speed, optimize

optimize-youtube-video/functions.php 85% from 13 tests

Analyzing the main PHP file in "Optimize Youtube Video" version 2.0.1
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("optimize-youtube-video.php" instead of "functions.php")
  • Git Repository: A Git repository was detected inside this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected720 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
Markdown21270568
PHP17972
CSS22069
JavaScript20011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions3
▷ Named functions3100.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
No PNG files were detected