67% kumori

Code Review | Kumori (曇)

WordPress plugin Kumori (曇) scored67%from 54 tests.

About plugin

  • Plugin page: kumori
  • Plugin version: 0.23
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2013
  • Latest release: Feb 10, 2015
  • Number of updates: 11
  • Update frequency: every 63.8 days
  • Top authors: gpower2 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,456 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼32.87ms] Passed 4 tests

Analyzing server-side resources used by Kumori (曇)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.74 ▼3.39
Dashboard /wp-admin2.99 ▼0.3121.15 ▼23.10
Posts /wp-admin/edit.php2.99 ▼0.3625.25 ▼21.23
Add New Post /wp-admin/post-new.php2.99 ▼2.8925.63 ▼74.37
Media Library /wp-admin/upload.php2.99 ▼0.2323.22 ▼12.79
Manage S3 /wp-admin/admin.php?page=kumori/kumori/S3Actions.php2.9922.78
Kumori-fy Videos! /wp-admin/admin.php?page=kumori/kumori/KumoriActions.php2.9923.78
Manage Elastic Transcoder /wp-admin/admin.php?page=kumori/kumori/ETrActions.php2.9921.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Kumori (曇)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.31 ▼1.071.82 ▼0.0737.75 ▼7.88
Dashboard /wp-admin2,235 ▲534.94 ▼0.0995.98 ▼6.8566.32 ▲26.44
Posts /wp-admin/edit.php2,118 ▲291.99 ▼0.1737.17 ▼3.7332.85 ▼2.25
Add New Post /wp-admin/post-new.php1,555 ▲2718.23 ▲0.09761.59 ▲160.5166.16 ▲6.26
Media Library /wp-admin/upload.php1,414 ▲264.21 ▼0.0196.37 ▲0.5669.43 ▲27.02
Manage S3 /wp-admin/admin.php?page=kumori/kumori/S3Actions.php7121.536.7316.91
Kumori-fy Videos! /wp-admin/admin.php?page=kumori/kumori/KumoriActions.php7161.536.7916.75
Manage Elastic Transcoder /wp-admin/admin.php?page=kumori/kumori/ETrActions.php7221.147.2927.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kumori/kumori/ETrActions.php
    • > User deprecated in wp-includes/functions.php+5453
    Function add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
    • > GET request to /wp-admin/admin.php?page=kumori/kumori/S3Actions.php
    • > Error in phar:///var/www/wordpress/wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/src/Aws/Common/InstanceMetadata/InstanceMetadataClient.php+85
    Uncaught Guzzle\Http\Exception\CurlException: [curl] 28: Connection timed out after 1000 milliseconds [url] http://169.254.169.254/latest/meta-data/iam/security-credentials/ in phar://wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php:579
    Stack trace:
    #0 phar://wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(510): Guzzle\Http\Curl\CurlMulti->isCurlException()
    #1 phar://wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(442): Guzzle\Http\Curl\CurlMulti->processResponse()
    #2 phar://wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(402): Guzzle\Http\Curl\CurlMulti->processMessages()
    #3 phar://wp-content/plugins/kumori/kumori/Core/AWS/aws.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.p
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kumori/kumori/ETrActions.php
    • > Notice in wp-content/plugins/kumori/kumori/ETrActions.php+132
    Undefined variable: etr
    • > GET request to /wp-admin/admin.php?page=kumori/kumori/KumoriActions.php
    • > Error in wp-content/plugins/kumori/kumori/KumoriActions.php+188
    Uncaught Error: Call to a member function listPresets() on null in wp-content/plugins/kumori/kumori/KumoriActions.php:188
    Stack trace:
    #0 wp-admin/admin.php(293): include()
    #1 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=kumori/kumori/ETrActions.php
    • > Error in wp-content/plugins/kumori/kumori/ETrActions.php+132
    Uncaught Error: Call to a member function listPipelines() on null in wp-content/plugins/kumori/kumori/ETrActions.php:132
    Stack trace:
    #0 wp-admin/admin.php(293): include()
    #1 {main}
    thrown

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
Please take a closer look at the following
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CORE_PATH - assumed 'CORE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/Core/Wrappers/ElasticTranscoderClientWrapper.php on line 3
    • > PHP Warning
      Use of undefined constant CORE_PATH - assumed 'CORE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/Core/Wrappers/IAMClientWrapper.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'KUMORI_PATHkumori/Core/Core.php' (include_path='.:/usr/share/php') in wp-content/plugins/kumori/kumori/ETrActions.php on line 6
    • > PHP Warning
      require_once(CORE_PATHObjects/ElasticTranscoderObjects.php): failed to open stream: No such file or directory in wp-content/plugins/kumori/kumori/Core/Wrappers/ElasticTranscoderClientWrapper.php on line 3
    • > PHP Warning
      Use of undefined constant KUMORI_PATH - assumed 'KUMORI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/S3Actions.php on line 6
    • > PHP Warning
      Use of undefined constant KUMORI_PATH - assumed 'KUMORI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/KumoriActions.php on line 6
    • > PHP Warning
      require_once(CORE_PATHObjects/S3Objects.php): failed to open stream: No such file or directory in wp-content/plugins/kumori/kumori/Core/Wrappers/SimpleStorageServiceClientWrapper.php on line 3
    • > PHP Warning
      Use of undefined constant CORE_PATH - assumed 'CORE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/Core/Wrappers/AWSClientFactoryWrapper.php on line 3
    • > PHP Warning
      Use of undefined constant KUMORI_URL - assumed 'KUMORI_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kumori/kumori/S3Actions.php on line 1
    • > PHP Fatal error
      require_once(): Failed opening required 'KUMORI_PATHkumori/Core/Core.php' (include_path='.:/usr/share/php') in wp-content/plugins/kumori/kumori/KumoriActions.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: You should set the name of your plugin on the first line ( === kumori === )
  • Contributors: The plugin tags were not defined
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

kumori/kumori.php Passed 13 tests

The entry point to "Kumori (曇)" version 0.23 is a PHP file that has certain tags in its header comment area
70 characters long description:
Transcode video files on-the-cloud using AWS Elastic Transcoder and S3

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
Good job! No executable or dangerous file extensions detected1,799 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP251882191,799

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods110
▷ Static methods10.91%
▷ Public methods10494.55%
▷ Protected methods00.00%
▷ Private methods65.45%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
kumori/kumori_favicon2_png24.png0.36KB0.26KB▼ 27.20%
kumori/kumori_favicon_png24.png0.50KB0.36KB▼ 27.22%
kumori/kumori_logo_png24.png6.30KB4.48KB▼ 28.91%
kumori/kumori_logo2_png24.png11.00KB6.75KB▼ 38.63%