10% wp-yadisk-files

Code Review | YaDisk Files

WordPress plugin YaDisk Files scored10%from 54 tests.

About plugin

  • Plugin page: wp-yadisk-files
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2013
  • Latest release: Nov 27, 2018
  • Number of updates: 25
  • Update frequency: every 85.3 days
  • Top authors: antongorodezkiy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,017 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-yadisk-files/libraries/class_webdav_client.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; webdav_client has a deprecated constructor

Server metrics [RAM: ▼1.46MB] [CPU: ▼53.75ms] Passed 4 tests

An overview of server-side resources used by YaDisk Files
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.71 ▼2.63
Dashboard /wp-admin2.48 ▼0.827.76 ▼44.75
Posts /wp-admin/edit.php2.48 ▼0.878.38 ▼42.69
Add New Post /wp-admin/post-new.php2.48 ▼3.407.55 ▼98.83
Media Library /wp-admin/upload.php2.48 ▼0.747.79 ▼28.73
YaDisk Files /wp-admin/options-general.php?page=wp-yadisk-files2.496.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for YaDisk Files
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲20513.82 ▼0.386.69 ▲4.7443.91 ▲2.31
Dashboard /wp-admin2,279 ▲1025.21 ▼0.4597.02 ▼1.2339.48 ▼6.53
Posts /wp-admin/edit.php2,186 ▲842.72 ▲0.6947.55 ▲8.5237.38 ▲5.13
Add New Post /wp-admin/post-new.php1,598 ▲6422.97 ▲4.64645.84 ▼7.8337.14 ▼32.62
Media Library /wp-admin/upload.php1,484 ▲814.73 ▲0.53105.65 ▲2.7044.24 ▼0.20
YaDisk Files /wp-admin/options-general.php?page=wp-yadisk-files1,2362.4438.6463.01

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-yadisk-files/libraries/class_webdav_client.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; webdav_client has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Deprecated in wp-content/plugins/wp-yadisk-files/libraries/class_webdav_client.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; webdav_client has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Notice in wp-content/plugins/wp-yadisk-files/libraries/notify.class.php+619
    Undefined variable: _SESSION

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function getMessages() on null in wp-content/plugins/wp-yadisk-files/views/popup.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'webdav_client' not found in wp-content/plugins/wp-yadisk-files/libraries/yadisk.class.php:4
    • > PHP Notice
      Undefined variable: notify in wp-content/plugins/wp-yadisk-files/views/popup.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-yadisk-files/js/notify.js?ver=6.3.1:101:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-yadisk-files/js/admin.js?ver=6.3.1:110:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/options-general.php?page=wp-yadisk-files
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-yadisk-files === )
Please take inspiration from this readme.txt

wp-yadisk-files/wp-yadisk-files.php 92% from 13 tests

The main PHP script in "YaDisk Files" version 1.2.5 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

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
There were no executable files found in this plugin8,619 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS9719294,566
PHP124299092,027
JavaScript82284091,874
PO File15664152

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity49.50
▷ Minimum class complexity4.00
▷ Maximum class complexity123.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods74
▷ Static methods11.35%
▷ Public methods7195.95%
▷ Protected methods34.05%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.31MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%