78% wp-vimeo-videos

Code Review | Video Uploads for Vimeo

WordPress plugin Video Uploads for Vimeo scored 78% from 54 tests.

About plugin

  • Plugin page: wp-vimeo-videos
  • Plugin version: 1.9.4
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2019
  • Latest release: Jul 22, 2023
  • Number of updates: 82
  • Update frequency: every 19.4 days
  • Top authors: DarkoG (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active / 9,478 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.98MB] [CPU: ▲2.89ms] 75% from 4 tests

Server-side resources used by Video Uploads for Vimeo
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 675.35ms on /wp-admin/options-general.php?page=dgv-settings)
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲1.0047.61 ▲3.41
Dashboard /wp-admin4.28 ▲0.9854.78 ▲9.25
Posts /wp-admin/edit.php4.33 ▲0.9860.10 ▲6.81
Add New Post /wp-admin/post-new.php6.88 ▲1.0090.51 ▼7.93
Media Library /wp-admin/upload.php4.21 ▲0.9852.59 ▲15.58
Vimeo /wp-admin/options-general.php?page=dgv-settings4.20675.35
Vimeo /wp-admin/upload.php?page=dgv-library4.1939.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4,109 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Video Uploads for Vimeo
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲22914.44 ▲0.071.69 ▼0.4837.62 ▼9.50
Dashboard /wp-admin2,395 ▲2075.67 ▼0.22124.53 ▲20.6855.27 ▲9.72
Posts /wp-admin/edit.php2,275 ▲1862.38 ▲0.3847.10 ▲4.0046.81 ▲10.37
Add New Post /wp-admin/post-new.php6,598 ▲5,06318.79 ▼4.25950.72 ▲246.9250.23 ▼3.74
Media Library /wp-admin/upload.php1,577 ▲1925.02 ▲0.81104.98 ▲0.5750.86 ▲5.90
Vimeo /wp-admin/options-general.php?page=dgv-settings1,0432.4026.9629.89
Vimeo /wp-admin/upload.php?page=dgv-library1,0342.6135.3324.38

Uninstaller [IO: ▲0.01MB] [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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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 take a closer look at the following
  • 32× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/predis/predis/examples/lua_scripting_abstraction.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/predis/predis/examples/transaction_using_cas.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/examples/redis_collections_iterators.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/predis/predis/examples/replication_sentinel.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/examples/replication_sentinel.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/predis/predis/examples/monitor_consumer.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/examples/shared.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/examples/replication_simple.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/examples/transaction_using_cas.php
    • > /wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/predis/predis/examples/debuggable_connection.php
  • 1510× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TusPhp\\Cache\\AbstractCache' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/ankitpokhrel/tus-php/src/Cache/RedisStore.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Exception\\UuidExceptionInterface' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\PubSubSubscribe' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/predis/predis/src/Command/PubSubSubscribeByPattern.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/symfony/translation/Dumper/IniFileDumper.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\Constraint\\Constraint' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle7/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/guzzlehttp/guzzle/src/Pool.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/symfony/translation/Test/ProviderFactoryTestCase.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/wp-vimeo-videos/libraries/vimeo-php-guzzle6/vendor/psr/http-message/src/ServerRequestInterface.php:43

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: video, upload, embed video, vimeo, upload vimeo

wp-vimeo-videos/wp-vimeo-videos.php Passed 13 tests

The main PHP file in "Video Uploads for Vimeo" ver. 1.9.4 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
Embed and upload videos to Vimeo directly from WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected140,250 lines of code in 1,949 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,89359,729128,930122,690
Markdown272,12407,167
JSON3005,518
XSD392482,803
JavaScript91612571,292
CSS57623596
XML34160
Bourne Again Shell1101457
INI16624
YAML22024
Dockerfile18010
make1409

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.24
▷ Minimum class complexity1.00
▷ Maximum class complexity306.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces162
Interfaces306
Traits81
Classes1,752
▷ Abstract classes925.25%
▷ Concrete classes1,66094.75%
▷ Final classes29317.65%
Methods13,217
▷ Static methods1,46411.08%
▷ Public methods11,05983.67%
▷ Protected methods1,0868.22%
▷ Private methods1,0728.11%
Functions1,296
▷ Named functions42632.87%
▷ Anonymous functions87067.13%
Constants1,369
▷ Global constants19514.24%
▷ Class constants1,17485.76%
▷ Public constants1,00785.78%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
shared/img/icon-64.png0.25KB0.24KB▼ 4.98%