84% c4d-youtube

Code Review | C4D Youtube

WordPress plugin C4D Youtube scored 84% from 54 tests.

About plugin

  • Plugin page: c4d-youtube
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 8
  • Update frequency: every 2.8 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 718 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by C4D Youtube
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.87 ▼7.18
Dashboard /wp-admin3.32 ▲0.0247.72 ▼6.07
Posts /wp-admin/edit.php3.37 ▲0.0145.50 ▼3.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.83 ▼16.98
Media Library /wp-admin/upload.php3.24 ▲0.0133.73 ▲0.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for C4D Youtube
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.80 ▼0.959.89 ▲8.0940.10 ▼7.50
Dashboard /wp-admin2,206 ▲185.86 ▼0.04104.41 ▼10.3840.73 ▼5.54
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0434.38 ▲0.1432.21 ▼4.13
Add New Post /wp-admin/post-new.php1,533 ▲523.33 ▲0.52655.40 ▲65.1359.90 ▲12.39
Media Library /wp-admin/upload.php1,391 ▼04.25 ▲0.0697.34 ▲0.0844.41 ▲2.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-youtube/c4d-youtube.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 100 tag instead of maximum 10
The official readme.txt is a good inspiration

c4d-youtube/c4d-youtube.php Passed 13 tests

The primary PHP file in "C4D Youtube" version 2.0.0 is used by WordPress to initiate all plugin functionality
46 characters long description:
Present your Youtube video with slider or grid

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
There were no executable files found in this plugin4,592 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,5763523,650
CSS69137790
Sass10089
PHP18940
JSON10023

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
libs/owl-carousel/grabbing.png0.11KB0.14KB0.00%