83% ld-video-resume

Code Review | Video Resume for LearnDash

WordPress plugin Video Resume for LearnDash scored83%from 54 tests.

About plugin

  • Plugin page: ld-video-resume
  • Plugin version: 1.1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 6, 2021
  • Latest release: Jan 8, 2023
  • Number of updates: 11
  • Update frequency: every 55.7 days
  • Top authors: manishswamy077 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /3,524 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼8.68MB] [CPU: ▼1,790,536.81ms] Passed 4 tests

This is a short check of server-side resources used by Video Resume for LearnDash
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▼34.8240.40 ▼7,162,096.63
Dashboard /wp-admin3.40 ▲0.0149.53 ▼17.63
Posts /wp-admin/edit.php3.51 ▲0.1153.21 ▼4.27
Add New Post /wp-admin/post-new.php5.98 ▲0.0583.76 ▼28.72
Media Library /wp-admin/upload.php3.32 ▲0.0541.37 ▲1.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Video Resume for LearnDash
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.34 ▼0.011.91 ▲0.0742.13 ▼0.06
Dashboard /wp-admin2,198 ▲215.62 ▲0.0589.20 ▼8.6737.24 ▼7.36
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0641.17 ▲4.0038.15 ▲0.39
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▼0.30689.43 ▼14.7164.62 ▲6.31
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.07109.22 ▼8.7646.58 ▼3.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ld_video_resume_ns\\add_action() in wp-content/plugins/ld-video-resume/public/class-video_resume.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ld_video_resume_ns\\add_filter() in wp-content/plugins/ld-video-resume/admin/class-video-resume-setting.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ld_video_resume_ns\\add_action() in wp-content/plugins/ld-video-resume/public/class-video_resume.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ld_video_resume_ns\\add_filter() in wp-content/plugins/ld-video-resume/admin/class-video-resume-setting.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png Video setting on lesson/topic edit page), #2 (screenshot-2.png Front-end demo)
You can take inspiration from this readme.txt

ld-video-resume/sfwd-video-resume.php 85% from 13 tests

Analyzing the main PHP file in "Video Resume for LearnDash" version 1.1.0.2
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("ld-video-resume.php" instead of "sfwd-video-resume.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected414 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64540233
PHP85195181

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.00
▷ Minimum class complexity12.00
▷ Maximum class complexity16.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 1.09MB with 0.77MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png1,011.21KB322.33KB▼ 68.12%
screenshot-1.png109.36KB29.34KB▼ 73.17%