78% docus

Code Review | Docus - YouTube Video Playlist

WordPress plugin Docus - YouTube Video Playlist scored78%from 54 tests.

About plugin

  • Plugin page: docus
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Aug 8, 2023
  • Number of updates: 13
  • Update frequency: every 70.6 days
  • Top authors: htplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /886 total downloads

Benchmarks

Plugin footprint 82% 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.19MB] [CPU: ▼1.19ms] 75% from 4 tests

A check of server-side resources used by Docus - YouTube Video Playlist
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,414.71ms on /wp-admin/admin.php?page=docus-recommendations)
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1943.17 ▼1.56
Dashboard /wp-admin3.50 ▲0.2050.16 ▼4.71
Posts /wp-admin/edit.php3.61 ▲0.2651.05 ▲1.15
Add New Post /wp-admin/post-new.php6.08 ▲0.1995.01 ▲0.35
Media Library /wp-admin/upload.php3.42 ▲0.1938.55 ▲3.37
Docus /wp-admin/admin.php?page=docus-setting-page3.4135.54
Recommendations /wp-admin/admin.php?page=docus-recommendations7.801,414.71

Server storage [IO: ▲0.59MB] [DB: ▲0.67MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
page_layout_style
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Docus - YouTube Video Playlist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6514.13 ▼0.022.23 ▲0.1843.84 ▼0.10
Dashboard /wp-admin2,220 ▲405.56 ▼0.0384.01 ▼8.1577.10 ▲35.11
Posts /wp-admin/edit.php2,136 ▲362.01 ▼0.0238.30 ▲1.4235.27 ▼1.53
Add New Post /wp-admin/post-new.php1,547 ▲1922.83 ▼0.07665.60 ▲14.3450.61 ▼4.19
Media Library /wp-admin/upload.php1,433 ▲334.23 ▲0.0199.27 ▲1.0178.73 ▲30.72
Docus /wp-admin/admin.php?page=docus-setting-page1,0892.0825.0631.32
Recommendations /wp-admin/admin.php?page=docus-recommendations2,8782.2332.7245.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • page_layout_style
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=docus-recommendations
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/docus/admin/template/shortcode-info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/docus/includes/class.docus.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/docus/admin/template/general-setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/docus/includes/class.shortcode.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #4 in docus/assets to your readme.txt
The official readme.txt might help

docus/docus.php Passed 13 tests

The main file in "Docus - YouTube Video Playlist" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Show youtube Video palylist onto any page of your wibsite.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,936 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72411941,088
CSS414127944
PHP7160139904

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.30
Average class complexity15.25
▷ Minimum class complexity2.00
▷ Maximum class complexity46.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.13MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) admin/assets/images/extensions/ht-click-to-call.png1.70KB0.00KB▼ 100.00%
(invalid) admin/assets/images/extensions/docus-pro.png3.98KB0.00KB▼ 100.00%
admin/assets/images/playlist-3.png1.41KB0.75KB▼ 47.05%
(invalid) admin/assets/images/extensions/was-this-helpful.png1.21KB0.00KB▼ 100.00%
(invalid) admin/assets/images/extensions/cf7-extensions-pro.png8.57KB0.00KB▼ 100.00%