84% sm-youtube-video-iframe

Code Review | SM YouTube Video iFrame

WordPress plugin SM YouTube Video iFrame scored84%from 54 tests.

About plugin

  • Plugin page: sm-youtube-video-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2017
  • Latest release: Sep 12, 2017
  • Number of updates: 6
  • Update frequency: every 5.3 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.81ms] Passed 4 tests

An overview of server-side resources used by SM YouTube Video iFrame
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.29 ▼1.26
Dashboard /wp-admin3.34 ▲0.0352.05 ▼1.26
Posts /wp-admin/edit.php3.39 ▲0.0349.86 ▼3.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.70 ▼16.44
Media Library /wp-admin/upload.php3.26 ▲0.0336.11 ▼2.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SM YouTube Video iFrame
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.131.97 ▲0.1247.05 ▼0.03
Dashboard /wp-admin2,195 ▲155.67 ▲0.0191.97 ▼0.5042.56 ▼0.65
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0040.79 ▲3.4437.45 ▲3.53
Add New Post /wp-admin/post-new.php1,554 ▲1918.39 ▼4.83626.95 ▲7.4056.57 ▲4.55
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0598.69 ▼12.0243.35 ▼6.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_smyoutubevideoiframe_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sm-youtube-video-iframe/sm-youtube-video-iframe.php:11

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: youtube, video iframe, video embed, widget

sm-youtube-video-iframe/sm-youtube-video-iframe.php Passed 13 tests

The main PHP file in "SM YouTube Video iFrame" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
41 characters long description:
Youtube video iframe plugin for wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1173991

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin