10% king-ftp

Code Review | king_ftp

WordPress plugin king_ftp scored10%from 54 tests.

About plugin

  • Plugin page: king-ftp
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Mar 9, 2019
  • Latest release: Mar 9, 2019
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: mohsensd1373 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/king-ftp/king_ftp.php+625
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.75MB] [CPU: ▼54.08ms] Passed 4 tests

Analyzing server-side resources used by king_ftp
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.235.97 ▼41.62
Dashboard /wp-admin2.26 ▼1.056.76 ▼41.29
Posts /wp-admin/edit.php2.26 ▼1.106.83 ▼45.17
Add New Post /wp-admin/post-new.php2.26 ▼3.636.18 ▼88.25
Media Library /wp-admin/upload.php2.26 ▼0.975.19 ▼27.79
king ftp /wp-admin/plugins.php?page=king_ftp_option_menu2.276.08

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for king_ftp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.57 ▼0.808.81 ▲7.0843.34 ▼3.78
Dashboard /wp-admin2,215 ▲275.83 ▲0.9699.57 ▼6.1238.35 ▼3.25
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0134.69 ▼9.9132.48 ▼2.16
Add New Post /wp-admin/post-new.php1,522 ▲817.74 ▼0.02642.26 ▼58.2060.70 ▲5.08
Media Library /wp-admin/upload.php1,394 ▲94.25 ▲0.0497.50 ▼21.2445.23 ▼2.84
king ftp /wp-admin/plugins.php?page=king_ftp_option_menu8131.7324.8324.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/king-ftp/king_ftp.php+625
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=king_ftp_option_menu
    • > Deprecated in wp-content/plugins/king-ftp/king_ftp.php+627
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/plugins.php?page=king_ftp_option_menu
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/plugins.php?page=king_ftp_option_menu
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: upload, ftp, upload ftp file

king-ftp/king_ftp.php 85% from 13 tests

"king_ftp" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("king-ftp.php" instead of "king_ftp.php")

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
Everything looks great! No dangerous files found in this plugin6,293 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS554212,849
SVG1002,671
PHP119342508
PO File15963143
JavaScript13216122

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
47 PNG files occupy 0.53MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
png/doc.png12.39KB6.35KB▼ 48.73%
png/psd.png12.48KB6.54KB▼ 47.64%
png/xls.png8.07KB4.28KB▼ 46.97%
png/024-audition.png12.60KB6.44KB▼ 48.86%
png/apk.png7.07KB7.05KB0.28%