84% demowolf-video-tutorial-importer

Code Review | DemoWolf Video Tutorial Importer

WordPress plugin DemoWolf Video Tutorial Importer scored84%from 54 tests.

About plugin

  • Plugin page: demowolf-video-tu...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: Jun 11, 2016
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: demowolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.57ms] Passed 4 tests

Analyzing server-side resources used by DemoWolf Video Tutorial Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.87 ▲0.83
Dashboard /wp-admin3.34 ▲0.0442.67 ▼6.33
Posts /wp-admin/edit.php3.39 ▲0.0447.57 ▼2.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.66 ▼14.57
Media Library /wp-admin/upload.php3.26 ▲0.0433.78 ▲1.23
Import Videos /wp-admin/tools.php?page=upload_video3.2331.64

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for DemoWolf Video Tutorial Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.35 ▼1.031.68 ▼0.1143.94 ▲3.59
Dashboard /wp-admin2,212 ▲244.85 ▼0.16104.38 ▼5.3139.55 ▼1.48
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0439.55 ▼1.9935.09 ▲0.65
Add New Post /wp-admin/post-new.php1,533 ▼323.06 ▲0.05665.64 ▲9.5856.14 ▼13.21
Media Library /wp-admin/upload.php1,388 ▼04.17 ▲0.0095.95 ▼4.9741.46 ▼1.99
Import Videos /wp-admin/tools.php?page=upload_video8302.0724.1530.85

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/demowolf-video-tutorial-importer/import_videos.php:12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Once the plugin is installed, navigate to "Tools" then "Import Videos" and you'll arrive at this screen. This is where you select your videos.xml file, choose your upload option, then click to import your videos.), #2 (An sample page that was created by the importer. The page that was created was "cPanel Paper Lantern End User series", and this screenshot shows the first video in the series.)
The official readme.txt is a good inspiration

demowolf-video-tutorial-importer/import_videos.php 92% from 13 tests

"DemoWolf Video Tutorial Importer" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("demowolf-video-tutorial-importer.php" instead of "import_videos.php")

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
Success! There were no dangerous files found in this plugin254 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25022250
CSS1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.48MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png71.61KB25.43KB▼ 64.49%
assets/icon-128x128.png13.19KB5.23KB▼ 60.38%
screenshot-1.png71.61KB25.43KB▼ 64.49%
screenshot-2.png123.82KB41.92KB▼ 66.14%
assets/banner-772x250.png83.13KB26.63KB▼ 67.96%