79% video-analytics-for-cloudflare-stream

Code Review | Video Analytics for Cloudflare Stream

WordPress plugin Video Analytics for Cloudflare Stream scored 79% from 54 tests.

About plugin

  • Plugin page: video-analytics-f...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 27, 2019
  • Latest release: Dec 6, 2020
  • Number of updates: 11
  • Update frequency: every 31.6 days
  • Top authors: andypitechnology (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 755 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.34ms] Passed 4 tests

Analyzing server-side resources used by Video Analytics for Cloudflare Stream
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.72 ▼8.04
Dashboard /wp-admin3.33 ▲0.0341.58 ▼7.93
Posts /wp-admin/edit.php3.38 ▲0.0248.59 ▼2.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.55 ▼7.14
Media Library /wp-admin/upload.php3.25 ▲0.0232.63 ▼1.69
Settings /wp-admin/admin.php?page=cfsa-plugin-23.2225.44
/wp-admin/options.php?page=cfsa-plugin-view3.2229.32
Video Analytics for Cloudflare /wp-admin/admin.php?page=cfsa-plugin3.1929.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Video Analytics for Cloudflare Stream
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.56 ▼0.741.88 ▼0.0539.12 ▼14.06
Dashboard /wp-admin2,233 ▲484.86 ▼0.26111.32 ▼3.3042.56 ▼5.33
Posts /wp-admin/edit.php2,116 ▲271.98 ▼0.0138.65 ▼1.0838.73 ▲2.93
Add New Post /wp-admin/post-new.php1,559 ▲2523.28 ▲0.09655.41 ▼19.5455.40 ▲5.22
Media Library /wp-admin/upload.php1,418 ▲304.23 ▲0.0397.52 ▼8.5341.53 ▼1.42
Settings /wp-admin/admin.php?page=cfsa-plugin-28762.1829.2428.31
/wp-admin/options.php?page=cfsa-plugin-view7902.0221.8622.53
Video Analytics for Cloudflare /wp-admin/admin.php?page=cfsa-plugin8892.0221.5928.05

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cfsa-plugin
    • > Notice in wp-content/plugins/video-analytics-for-cloudflare-stream/csa-options.php+31
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/video-analytics-for-cloudflare-stream/csa-options.php:334

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: analytics, stream, cloudflare, video

video-analytics-for-cloudflare-stream/video-analytics-for-cloudflare-stream.php Passed 13 tests

The main file in "Video Analytics for Cloudflare Stream" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
Video Analytics for Cloudflare Stream

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin423 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27747423

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png18.50KB20.57KB0.00%