82% advanced-video-player-with-analytics

Code Review | Advanced Video Player with Analytics

WordPress plugin Advanced Video Player with Analytics scored 82% from 54 tests.

About plugin

  • Plugin page: advanced-video-pl...
  • Plugin version: 1...
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4
  • WordPress version: 5.9.2
  • First release: May 16, 2020
  • Latest release: May 16, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: sony7596 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 597 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼309.09ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Video Player with Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.08101.84 ▲46.38
Dashboard /wp-admin3.52 ▲0.1139.09 ▲0.02
Posts /wp-admin/edit.php3.75 ▲0.1148.71 ▼46.84
Add New Post /wp-admin/post-new.php6.97 ▼0.0195.87 ▼1,184.85
Media Library /wp-admin/upload.php3.38 ▲0.0824.65 ▼4.69
Advanced Video Player with Analytics /wp-admin/options-general.php?page=avpa3.3830.51
Video detail /wp-admin/admin.php?page=video-detail-page3.3823.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 115 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Video Player with Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,002 ▲28017.33 ▲1.709.30 ▲3.172.16 ▼0.23
Dashboard /wp-admin3,110 ▲2567.92 ▲1.74142.99 ▼4.31154.88 ▼6.84
Posts /wp-admin/edit.php2,946 ▲2525.09 ▲1.8682.66 ▲17.81141.89 ▲3.43
Add New Post /wp-admin/post-new.php1,701 ▲4018.13 ▲1.91408.53 ▼49.51183.33 ▲30.11
Media Library /wp-admin/upload.php1,734 ▲365.54 ▲0.01107.02 ▼51.32181.78 ▼3.70
Advanced Video Player with Analytics /wp-admin/options-general.php?page=avpa1,2284.1867.8086.45
Video detail /wp-admin/admin.php?page=video-detail-page8302.3338.1653.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=video-detail-page
    • > Notice in wp-content/plugins/advanced-video-player-with-analytics/templates/video-detail.php+2
    Undefined index: id

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advanced-video-player-with-analytics/templates/shortcode-generator.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-video-player-with-analytics/templates/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/advanced-video-player-with-analytics/templates/tracking-data.php:5
    • > PHP Notice
      Undefined index: id in wp-content/plugins/advanced-video-player-with-analytics/templates/video-detail.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-video-player-with-analytics/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/advanced-video-player-with-analytics/templates/video-detail.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

advanced-video-player-with-analytics/advanced-video-player-with-analytics.php 85% from 13 tests

The principal PHP file in "Advanced Video Player with Analytics" v. 1... is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1...")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin135,797 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5539,99889,646131,311
JSON37102,251
CSS6229111,522
PHP713870599
SVG100114

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin