83% authenticate-sponsorware-videos-via-github

Code Review | Authenticate Sponsorware Videos via GitHub

WordPress plugin Authenticate Sponsorware Videos via GitHub scored 83% from 54 tests.

About plugin

  • Plugin page: authenticate-spon...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Jan 10, 2023
  • Number of updates: 9
  • Update frequency: every 79.3 days
  • Top authors: opensheetmusicdisplay (88.89%)fredmeister77 (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▼2.16ms] Passed 4 tests

This is a short check of server-side resources used by Authenticate Sponsorware Videos via GitHub
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3840.32 ▼7.33
Dashboard /wp-admin3.69 ▲0.3847.40 ▼1.97
Posts /wp-admin/edit.php3.74 ▲0.3850.40 ▲3.59
Add New Post /wp-admin/post-new.php6.32 ▲0.4489.90 ▼2.94
Media Library /wp-admin/upload.php3.61 ▲0.3840.10 ▲8.90
Settings /wp-admin/admin.php?page=githubauthvideo_settings3.5135.33
All Github Sponsor Videos /wp-admin/edit.php?post_type=github-sponsor-video3.6844.05

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 126 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Authenticate Sponsorware Videos via GitHub: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.24 ▼1.137.57 ▲5.3740.34 ▼7.76
Dashboard /wp-admin2,231 ▲465.84 ▼0.04103.34 ▼6.8537.20 ▼6.71
Posts /wp-admin/edit.php2,123 ▲372.07 ▼0.0838.28 ▲1.7535.98 ▲1.03
Add New Post /wp-admin/post-new.php6,663 ▲5,12123.42 ▲5.22920.60 ▲301.4058.76 ▲3.27
Media Library /wp-admin/upload.php1,419 ▲284.21 ▲0.0298.55 ▼2.4940.76 ▼4.16
Settings /wp-admin/admin.php?page=githubauthvideo_settings8762.0623.4033.51
All Github Sponsor Videos /wp-admin/edit.php?post_type=github-sponsor-video1,2433.3755.8025.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 54× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Key' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Signer/Key/LocalFileReference.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/ralouphie/mimey/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/ralouphie/mimey/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Claim\\Basic' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php:21
    • > PHP Warning
      Class 'Lcobucci\\JWT\\Token' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/compat/class-aliases.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Ecdsa' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Exception' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Encoding/CannotEncodeContent.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\BaseSigner' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Signer/None.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Exception' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Signer/Key/FileCouldNotBeRead.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/ralouphie/mimey/tests/src/MimeTypesTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Hmac' not found in wp-content/plugins/authenticate-sponsorware-videos-via-github/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: sponsor, oauth, github, block, video

authenticate-sponsorware-videos-via-github/githubauthvideo.php 77% from 13 tests

The principal PHP file in "Authenticate Sponsorware Videos via GitHub" v. 1.2.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 182 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("authenticate-sponsorware-videos-via-github.php" instead of "githubauthvideo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin12,158 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP1029672,25511,818
JSON400218
Markdown130076
YAML25023
XML14018
JavaScript3013
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces17
Interfaces11
Traits0
Classes76
▷ Abstract classes56.58%
▷ Concrete classes7193.42%
▷ Final classes2940.85%
Methods381
▷ Static methods6216.27%
▷ Public methods32485.04%
▷ Protected methods82.10%
▷ Private methods4912.86%
Functions32
▷ Named functions2681.25%
▷ Anonymous functions618.75%
Constants30
▷ Global constants310.00%
▷ Class constants2790.00%
▷ Public constants27100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.80MB with 0.50MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/github-icon.png1.53KB0.85KB▼ 44.56%
images/blur.png226.35KB20.22KB▼ 91.07%
images/editor-player.png588.56KB271.83KB▼ 53.81%