89% dalfak-video-widget

Code Review | Dalfak Video Widget

WordPress plugin Dalfak Video Widget scored89%from 54 tests.

About plugin

  • Plugin page: dalfak-video-widget
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: Oct 22, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: dalfakcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Dalfak Video Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.52 ▲4.03
Dashboard /wp-admin3.33 ▼0.0246.17 ▼10.71
Posts /wp-admin/edit.php3.38 ▲0.0242.18 ▼4.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.35 ▼10.90
Media Library /wp-admin/upload.php3.25 ▲0.0233.95 ▲0.27

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Dalfak Video Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.28 ▼1.101.69 ▼0.0841.83 ▲0.33
Dashboard /wp-admin2,212 ▲205.88 ▲0.9694.75 ▼13.9738.23 ▼5.34
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0135.86 ▲2.1833.98 ▼0.40
Add New Post /wp-admin/post-new.php6,355 ▲4,84127.57 ▲10.00815.12 ▲204.9158.58 ▲11.03
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.0195.97 ▼3.3343.46 ▲0.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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 93% from 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
3 plugin tags: video, dalfak, embed

dalfak-video-widget/dalfak.php 85% from 13 tests

Analyzing the main PHP file in "Dalfak Video Widget" version 1.0.4
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dalfak-video-widget.php" instead of "dalfak.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin496 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript582220
PO File1363586
PHP1182878
CSS20050
JSON10048
SVG20014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions7
▷ Named functions7100.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
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png6.54KB2.96KB▼ 54.74%
assets/images/dalfak-logo.png35.53KB17.37KB▼ 51.12%
assets/images/dalfak-nothumb.png35.53KB17.37KB▼ 51.12%