62% wp-copysafe-video

Code Review | CopySafe Video Protection

WordPress plugin CopySafe Video Protection scored62%from 54 tests.

About plugin

  • Plugin page: wp-copysafe-video
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2019
  • Latest release: May 5, 2023
  • Number of updates: 23
  • Update frequency: every 68.3 days
  • Top authors: ArtistScope (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /9,921 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.01MB] [CPU: ▼39.59ms] Passed 4 tests

Server-side resources used by CopySafe Video Protection
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.97 ▼0.4918.31 ▼24.28
Dashboard /wp-admin3.00 ▼0.3020.24 ▼27.70
Posts /wp-admin/edit.php3.01 ▼0.3517.81 ▼26.95
Add New Post /wp-admin/post-new.php3.01 ▼2.8816.97 ▼79.41
Media Library /wp-admin/upload.php3.01 ▼0.2215.98 ▼18.35
List Files /wp-admin/admin.php?page=wpcsv_list3.0118.54
Settings /wp-admin/admin.php?page=wpcsv_settings3.0119.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CopySafe Video Protection
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.77 ▼0.821.74 ▼0.1143.37 ▼0.29
Dashboard /wp-admin2,239 ▲505.36 ▼0.53101.80 ▼19.4137.83 ▼9.05
Posts /wp-admin/edit.php2,128 ▲422.35 ▲0.3134.59 ▼2.6031.52 ▼3.34
Add New Post /wp-admin/post-new.php1,702 ▲17422.35 ▲4.06580.87 ▼60.8927.28 ▼25.09
Media Library /wp-admin/upload.php1,425 ▲344.34 ▲0.1489.39 ▼8.4541.69 ▼1.54
List Files /wp-admin/admin.php?page=wpcsv_list8901.9825.6829.57
Settings /wp-admin/admin.php?page=wpcsv_settings1,3362.1328.1031.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+805
    Undefined index: page
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+809
    Undefined index: csvfilename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+813
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+817
    Undefined index: cspdel_nonce
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+258
    Undefined variable: lnguageOptionStr
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+320
    Undefined variable: minimum_version
    • > GET request to /wp-admin/admin.php?page=wpcsv_settings
    • > Notice in wp-content/plugins/wp-copysafe-video/wp-copysafe-video.php+361
    Undefined variable: allowremote

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-copysafe-video/popup_load.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WPCSV_PLUGIN_PATH - assumed 'WPCSV_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-video/popup_load.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/wp-copysafe-video/login-status.php:5
    • > PHP Warning
      Use of undefined constant WPCSV_PLUGIN_URL - assumed 'WPCSV_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-video/popup_load.php on line 53
    • > PHP Warning
      include(): Failed opening 'WPCSV_PLUGIN_PATHmedia-upload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-copysafe-video/popup_load.php on line 40
    • > PHP Warning
      include(WPCSV_PLUGIN_PATHmedia-upload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-copysafe-video/popup_load.php on line 40
    • > PHP Warning
      Use of undefined constant WPCSV_PLUGIN_URL - assumed 'WPCSV_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-copysafe-video/popup_load.php on line 46

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (CopySafe Videos can be added at the last position of the cursor by clicking the [Video] button.), #2 (Once the document is selected, you can then nominate settings to apply to this particular page or post.), #3 (The above default settings are applied to all CopySafe Video pages and posts.), #4 (The document file manager will list all uploaded document class files.)
Please take inspiration from this readme.txt

wp-copysafe-video/wp-copysafe-video.php Passed 13 tests

The main PHP script in "CopySafe Video Protection" version 2.7 is automatically included on every request by WordPress
138 characters long description:
This Wordpress plugin enables sites using CopySafe Video to easily add copy protected videos to web pages for display in the ArtisBrowser.

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
There were no executable files found in this plugin3,533 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS3401541,549
PHP51961541,311
JavaScript486100483
HTML3230190

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
10 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/settings.png1.83KB1.69KB▼ 7.68%
images/search.png2.72KB1.50KB▼ 44.98%
images/help-24-30.png1.52KB1.19KB▼ 21.77%
images/add_file.png1.02KB1.31KB0.00%
images/artistscope-logo48.png3.10KB1.78KB▼ 42.54%