77% playwire

Code Review | Video Player

WordPress plugin Video Player scored 77% from 53 tests.

About plugin

  • Plugin page: playwire
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4.2
  • WordPress version: 5.8.1
  • First release: Nov 18, 2014
  • Latest release: Feb 9, 2016
  • Number of updates: 37
  • Update frequency: every 12.5 days
  • Top authors: Playwire (67.57%)mountaininja (35.14%)

Code review

53 tests

User reviews

4 reviews

Install metrics

70+ active / 21,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.57MB] [CPU: ▼250.13ms] Passed 4 tests

A check of server-side resources used by Video Player
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.38 ▲0.6637.27 ▲13.14
Dashboard /wp-admin3.72 ▲0.6768.98 ▲21.84
Posts /wp-admin/edit.php3.79 ▲0.6969.48 ▲24.78
Add New Post /wp-admin/post-new.php5.71 ▲0.28121.15 ▼1,060.28
Media Library /wp-admin/upload.php3.73 ▲0.7271.42 ▲31.03
Playwire Settings /wp-admin/options-general.php?page=playwire-settings3.6468.28
Videos /wp-admin/edit.php?post_type=playwire_videos3.7866.71
Video Galleries /wp-admin/edit.php?post_type=playwire_playlists3.7862.95

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 68 new files
Database: no new tables, 1 new option
New WordPress options
playwire_videos_children

Browser metrics Passed 4 tests

Checking browser requirements for Video Player
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,931 ▲34917.44 ▲1.4915.06 ▲7.3246.64 ▼0.53
Dashboard /wp-admin3,033 ▲1836.67 ▲0.84139.81 ▼0.49101.72 ▼14.99
Posts /wp-admin/edit.php2,801 ▲952.79 ▲0.0975.67 ▲13.0096.46 ▼5.30
Add New Post /wp-admin/post-new.php1,721 ▲23818.91 ▲0.41350.59 ▼13.11130.06 ▲16.25
Media Library /wp-admin/upload.php1,950 ▲1785.47 ▲0.46137.93 ▼23.77118.37 ▲3.83
Playwire Settings /wp-admin/options-general.php?page=playwire-settings1,4396.17197.28105.20
Videos /wp-admin/edit.php?post_type=playwire_videos1,4862.7264.7288.98
Video Galleries /wp-admin/edit.php?post_type=playwire_playlists1,4582.7166.2182.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • playwire_videos_children

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
Almost there, just fix the following server-side errors
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=playwire_playlists
    • > Notice in wp-content/plugins/playwire/includes/classes/class-publisher-id.php+178
    Trying to access array offset on value of type bool

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected 'endwhile' (T_ENDWHILE) in wp-content/plugins/playwire/templates/template-playlist-library.php on line 52
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/playwire/includes/classes/class-video-category-walker.php:8

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (Example of admin video interface for Playwire)
Please take inspiration from this readme.txt

playwire/playwire.php 92% from 13 tests

The main file in "Video Player" v. 1.3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 260 characters long)

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
Everything looks great! No dangerous files found in this plugin6,460 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS5580723,594
PHP329531,3282,426
JavaScript481107408
SVG20030
Markdown1102

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity51.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods119
▷ Static methods3529.41%
▷ Public methods11596.64%
▷ Protected methods00.00%
▷ Private methods43.36%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 1.22MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/gallery.png7.47KB3.95KB▼ 47.12%
assets/banner-772x250.png244.70KB106.74KB▼ 56.38%
assets/img/playwire_logo.png2.49KB2.53KB0.00%
assets/screenshot-1.png62.33KB21.78KB▼ 65.07%
assets/img/playwire_settings.png43.64KB46.53KB0.00%