10% falconiform-youtube-widget

Code Review | Falconiform YouTube Widget

WordPress plugin Falconiform YouTube Widget scored10%from 54 tests.

About plugin

  • Plugin page: falconiform-youtu...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 21, 2014
  • Latest release: Jan 26, 2022
  • Number of updates: 18
  • Update frequency: every 160.9 days
  • Top authors: raubvogel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,597 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/falconiform-youtube-widget/falconiform-youtube-widget.php+830
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.75ms] Passed 4 tests

This is a short check of server-side resources used by Falconiform YouTube Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.49 ▼40.56
Dashboard /wp-admin2.05 ▼1.255.04 ▼47.03
Posts /wp-admin/edit.php2.05 ▼1.315.54 ▼49.11
Add New Post /wp-admin/post-new.php2.05 ▼3.846.12 ▼94.30
Media Library /wp-admin/upload.php2.05 ▼1.186.24 ▼29.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Falconiform YouTube Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.24 ▼0.981.59 ▼0.4741.76 ▼2.98
Dashboard /wp-admin2,221 ▲474.83 ▼1.06106.22 ▼26.5939.46 ▼23.71
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0240.15 ▲3.4934.88 ▲2.18
Add New Post /wp-admin/post-new.php1,533 ▼023.08 ▼0.16648.76 ▼24.8851.66 ▼3.20
Media Library /wp-admin/upload.php1,403 ▲154.20 ▼0.01122.86 ▲1.2959.63 ▲11.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/falconiform-youtube-widget/falconiform-youtube-widget.php+830
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_ff_youtube_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/falconiform-youtube-widget/falconiform-youtube-widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === falconiform-youtube-widget === )
The official readme.txt is a good inspiration

falconiform-youtube-widget/falconiform-youtube-widget.php Passed 13 tests

"Falconiform YouTube Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
41 characters long description:
Adds a widget that shows a YouTube video.

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
No dangerous file extensions were detected539 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1116290424
PO File14343111
CSS2164

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods832.00%
▷ Public methods1352.00%
▷ Protected methods00.00%
▷ Private methods1248.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected