73% video-reviews

Code Review | Video Reviews / Video Widget

WordPress plugin Video Reviews / Video Widget scored73%from 54 tests.

About plugin

  • Plugin page: video-reviews
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2021
  • Latest release: Nov 11, 2023
  • Number of updates: 16
  • Update frequency: every 55.8 days
  • Top authors: aharonyan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /1,268 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.00MB] [CPU: ▲13.86ms] 75% from 4 tests

Server-side resources used by Video Reviews / Video Widget
Please fix the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.00MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4250.39 ▲9.36
Dashboard /wp-admin8.90 ▲5.5671.21 ▲12.79
Posts /wp-admin/edit.php8.90 ▲5.5579.93 ▲30.25
Add New Post /wp-admin/post-new.php9.37 ▲3.49108.98 ▲3.02
Media Library /wp-admin/upload.php8.90 ▲5.6764.64 ▲33.54
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9058.55

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 212 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
fs_debug_mode
widget_recent-comments
widget_recent-posts
fs_active_plugins
theysaidso_admin_options
can_compress_scripts
fs_accounts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Video Reviews / Video Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3614.69 ▲0.341.57 ▼0.3830.94 ▼12.18
Dashboard /wp-admin2,225 ▲455.63 ▼0.0392.75 ▼5.0540.07 ▲0.18
Posts /wp-admin/edit.php2,134 ▲311.95 ▼0.0140.35 ▼2.1639.43 ▲2.27
Add New Post /wp-admin/post-new.php1,544 ▲1822.69 ▼0.55607.40 ▼69.1851.82 ▼4.34
Media Library /wp-admin/upload.php1,436 ▲334.22 ▼0.0396.88 ▼6.0747.13 ▲4.30
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0981.7925.6029.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/video-reviews/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_debug_mode
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_accounts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VDRV\\get_option() in wp-content/plugins/video-reviews/templates/video-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VDRV\\__() in wp-content/plugins/video-reviews/templates/admin/cta-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/video-reviews/templates/admin/video-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Call to action button example) image missing
You can look at the official readme.txt

video-reviews/video-reviews.php 85% from 13 tests

This is the main PHP file of "Video Reviews / Video Widget" version 1.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "5.7")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected35,285 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,17317,44533,822
JavaScript132336061,109
Sass5153307
JSON10031
CSS150215
Markdown1101

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity84.63
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,302
▷ Static methods20916.05%
▷ Public methods90269.28%
▷ Protected methods171.31%
▷ Private methods38329.42%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.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
6 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/premium/cta_action.png27.41KB13.42KB▼ 51.04%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/premium/cta_link.png36.00KB18.04KB▼ 49.90%
assets/img/premium/advanced_video_selector.png23.06KB11.25KB▼ 51.19%