79% wp-smart-tv

Code Review | WP Smart TV

WordPress plugin WP Smart TV scored79%from 54 tests.

About plugin

  • Plugin page: wp-smart-tv
  • Plugin version: 2.1.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2017
  • Latest release: Sep 15, 2022
  • Number of updates: 145
  • Update frequency: every 13.1 days
  • Top authors: robdavenport (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

700+ active /40,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.43MB] [CPU: ▲7.83ms] Passed 4 tests

A check of server-side resources used by WP Smart TV
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.49 ▲1.0362.33 ▲20.64
Dashboard /wp-admin4.89 ▲1.5561.29 ▼6.80
Posts /wp-admin/edit.php4.92 ▲1.5659.39 ▲13.62
Add New Post /wp-admin/post-new.php7.49 ▲1.61107.28 ▲5.36
Media Library /wp-admin/upload.php4.82 ▲1.5953.11 ▲19.14
General Settings /wp-admin/admin.php?page=rovidx_smart_tv_options5.1044.79
Recipe Builder /wp-admin/admin.php?page=wpstv_rdp5.1044.38
Advertising /wp-admin/admin.php?page=rovidx_smart_tv_ad_options5.0746.27
Import/Export /wp-admin/admin.php?page=rovidx_smart_tv_import_content5.0846.20
Roku Publisher /wp-admin/admin.php?page=rovidx_smart_tv_roku_options5.0944.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 637 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
rovidx_smart_tv_roku_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
rovidx_smart_tv_ad_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Smart TV
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲23113.97 ▼0.008.48 ▲6.6949.11 ▲3.91
Dashboard /wp-admin2,260 ▲755.40 ▲0.44107.08 ▼17.4792.12 ▲32.66
Posts /wp-admin/edit.php2,166 ▲772.49 ▲0.4942.45 ▲6.5950.61 ▲16.60
Add New Post /wp-admin/post-new.php1,593 ▲7918.68 ▲1.22724.19 ▲39.9240.18 ▼18.68
Media Library /wp-admin/upload.php1,460 ▲724.60 ▲0.41116.11 ▲13.9744.46 ▼1.71
General Settings /wp-admin/admin.php?page=rovidx_smart_tv_options1,0322.2330.3332.51
Recipe Builder /wp-admin/admin.php?page=wpstv_rdp1,0302.6335.7630.52
Advertising /wp-admin/admin.php?page=rovidx_smart_tv_ad_options9732.2629.1129.59
Import/Export /wp-admin/admin.php?page=rovidx_smart_tv_import_content9692.4035.3541.76
Roku Publisher /wp-admin/admin.php?page=rovidx_smart_tv_roku_options1,0362.4633.2540.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • can_compress_scripts
    • rovidx_smart_tv_roku_options
    • rovidx_smart_tv_ad_options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-smart-tv/public/partials/wp-smart-tv-public-display.php
    • > /wp-content/plugins/wp-smart-tv/admin/partials/wp-smart-tv-admin-display.php
  • 54× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-tv/lib/cmb2-conditionals.php:264
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-smart-tv/lib/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/wp-smart-tv/lib/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-smart-tv/lib/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-tv/lib/cmb2-plug-conditionals.php:177
    • > PHP Warning
      Use of undefined constant CMB2_ATTACHED_POSTS_FIELD_VERSION - assumed 'CMB2_ATTACHED_POSTS_FIELD_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-smart-tv/lib/WDS_CMB2_Attached_Posts.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-tv/lib/cmb2-fontawesome-picker.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-smart-tv/lib/cmb-field-select2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/wp-smart-tv/lib/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/wp-smart-tv/lib/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: html5 video player, video cms, firetv, roku, iptv

wp-smart-tv/wp-smart-tv.php Passed 13 tests

The main PHP file in "WP Smart TV" ver. 2.1.8 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
Toolkit for powering a video streaming service using WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin141,944 lines of code in 392 files:
LanguageFilesBlank linesComment linesLines of code
CSS535,4801,72742,896
JavaScript498,60213,03635,483
PO File12014,31518,50232,323
PHP953,3137,96011,701
Sass611,4904709,214
JSON2006,602
SVG8032,932
Markdown32470765
HTML171128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.14
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes100
▷ Abstract classes99.00%
▷ Concrete classes9191.00%
▷ Final classes00.00%
Methods757
▷ Static methods10013.21%
▷ Public methods60880.32%
▷ Protected methods10013.21%
▷ Private methods496.47%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants37
▷ Global constants1643.24%
▷ Class constants2156.76%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
48 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/rovidx-smart-tv-for-wordpress-movies.icon.png0.98KB0.12KB▼ 87.50%
admin/lib/mdb/img/overlays/06.png0.21KB0.10KB▼ 52.61%
assets/img/rovidx-smart-tv-for-wordpress-cc-settings.icon.png0.99KB0.15KB▼ 84.97%
lib/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
admin/lib/mdb/img/overlays/03.png0.20KB0.10KB▼ 53.11%