84% playable-video

Code Review | Playable Video

WordPress plugin Playable Video scored84%from 54 tests.

About plugin

  • Plugin page: playable-video
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: May 6, 2021
  • Number of updates: 5
  • Update frequency: every 42.4 days
  • Top authors: bob.hitching (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.85ms] Passed 4 tests

Analyzing server-side resources used by Playable Video
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.76 ▼5.26
Dashboard /wp-admin3.33 ▼0.0244.88 ▼14.08
Posts /wp-admin/edit.php3.38 ▲0.0246.63 ▼3.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.28 ▼8.72
Media Library /wp-admin/upload.php3.25 ▲0.0238.01 ▼1.10
Playable Video /wp-admin/options-general.php?page=playable-video3.2232.27

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Playable Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.321.71 ▼0.0342.67 ▲1.44
Dashboard /wp-admin2,202 ▲255.61 ▼0.0583.37 ▼2.8839.78 ▼0.07
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0542.11 ▲2.7636.79 ▲1.08
Add New Post /wp-admin/post-new.php1,530 ▲223.03 ▲0.05644.94 ▼18.3854.45 ▼0.85
Media Library /wp-admin/upload.php1,404 ▲74.12 ▼0.12112.04 ▲4.5548.61 ▲1.66
Playable Video /wp-admin/options-general.php?page=playable-video8932.1722.1530.29

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function playable_decode_video() in wp-content/plugins/playable-video/newsletter-block/block.php:24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/playable-video/newsletter-block/block.php on line 23
    • > PHP Warning
      array_merge(): Expected parameter 2 to be an array, null given in wp-content/plugins/playable-video/newsletter-block/block.php on line 21
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/playable-video/newsletter-block/block.php on line 21
    • > PHP Notice
      Undefined variable: controls in wp-content/plugins/playable-video/newsletter-block/options.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/playable-video/main.php:27
    • > PHP Fatal error
      Uncaught Error: Call to a member function textarea() on null in wp-content/plugins/playable-video/newsletter-block/options.php:25

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === playable-video === )
You can take inspiration from this readme.txt

playable-video/main.php 92% from 13 tests

The main file in "Playable Video" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("playable-video.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected111 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32128102
CSS1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.36MB with 0.36MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
newsletter-block/icon.png369.86KB3.73KB▼ 98.99%