67% wc-vimeo

Code Review | Video Sales for Woocommerce with Vimeo

WordPress plugin Video Sales for Woocommerce with Vimeo scored67%from 54 tests.

About plugin

  • Plugin page: wc-vimeo
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Jul 26, 2020
  • Number of updates: 20
  • Update frequency: every 28.7 days
  • Top authors: vincentastolfi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,517 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▼5.63ms] Passed 4 tests

Server-side resources used by Video Sales for Woocommerce with Vimeo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4742.56 ▼10.05
Dashboard /wp-admin3.77 ▲0.4651.64 ▼4.74
Posts /wp-admin/edit.php3.82 ▲0.4651.43 ▼2.93
Add New Post /wp-admin/post-new.php6.29 ▲0.4094.32 ▼4.81
Media Library /wp-admin/upload.php3.69 ▲0.4637.79 ▼1.97

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,816 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Video Sales for Woocommerce with Vimeo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.47 ▲0.181.71 ▼0.5841.39 ▼12.86
Dashboard /wp-admin2,206 ▲244.87 ▼0.00102.64 ▼42.1842.91 ▼4.51
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.48 ▼8.7432.24 ▼6.46
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.02625.36 ▼68.7452.00 ▼10.38
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.02103.49 ▼4.9350.85 ▲1.44

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-vimeo/vendor/symfony/mime/Resources/bin/update_mime_types.php
    • > /wp-content/plugins/wc-vimeo/vendor/symfony/translation/Resources/bin/translation-status.php
  • 600× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/wc-vimeo/vendor/predis/predis/src/Command/StringBitField.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\KeyExpire' not found in wp-content/plugins/wc-vimeo/vendor/predis/predis/src/Command/KeyPreciseExpire.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' not found in wp-content/plugins/wc-vimeo/vendor/symfony/translation/Extractor/PhpExtractor.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' not found in wp-content/plugins/wc-vimeo/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Uuid\\Codec\\StringCodec' not found in wp-content/plugins/wc-vimeo/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Connection\\ParametersInterface' not found in wp-content/plugins/wc-vimeo/vendor/predis/predis/src/Connection/Parameters.php:21
    • > PHP Fatal error
      Uncaught Predis\\Connection\\ConnectionException: Connection refused [tcp://127.0.0.1:6379] in wp-content/plugins/wc-vimeo/vendor/predis/predis/src/Connection/AbstractConnection.php:155
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-vimeo/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/wc-vimeo/vendor/predis/predis/src/Command/ZSetUnionStore.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' not found in wp-content/plugins/wc-vimeo/vendor/symfony/translation/Reader/TranslationReader.php:23

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 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: video, vimeo, sell, woocommerce

wc-vimeo/woocommerce-vimeo.php 62% from 13 tests

The principal PHP file in "Video Sales for Woocommerce with Vimeo" v. 0.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "3.5")
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-vimeo.php" instead of "woocommerce-vimeo.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wc-vimeo/vendor/nesbot/carbon/bin/carbon.bat
    • .exe - Executable in Windows
      • wp-content/plugins/wc-vimeo/vendor/symfony/console/Resources/bin/hiddeninput.exe
87,709 lines of code in 1,573 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,48451,733109,68775,237
Markdown432,30606,615
XSD392482,803
JSON28002,768
XML431102
CSS18053
JavaScript11243
YAML47138
INI16624
Dockerfile18010
make1409
DOS Batch1004
Bourne Shell1203

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.90
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces120
Interfaces110
Traits27
Classes668
▷ Abstract classes294.34%
▷ Concrete classes63995.66%
▷ Final classes639.86%
Methods5,169
▷ Static methods54410.52%
▷ Public methods4,26982.59%
▷ Protected methods4999.65%
▷ Private methods4017.76%
Functions535
▷ Named functions16230.28%
▷ Anonymous functions37369.72%
Constants381
▷ Global constants4411.55%
▷ Class constants33788.45%
▷ Public constants31894.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin