78% ftp-to-zip

Code Review | FTP to Zip

WordPress plugin FTP to Zip scored78%from 54 tests.

About plugin

  • Plugin page: ftp-to-zip
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2012
  • Latest release: Sep 18, 2016
  • Number of updates: 38
  • Update frequency: every 39.5 days
  • Top authors: Abhishek_Ghosh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /8,278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.05ms] Passed 4 tests

This is a short check of server-side resources used by FTP to Zip
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.18 ▼4.16
Dashboard /wp-admin3.31 ▼0.0445.50 ▼9.81
Posts /wp-admin/edit.php3.36 ▲0.0043.84 ▼2.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.06 ▲4.06
Media Library /wp-admin/upload.php3.23 ▲0.0034.57 ▲0.31

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

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

Browser metrics Passed 4 tests

A check of browser resources used by FTP to Zip
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.171.84 ▼0.0941.13 ▼0.04
Dashboard /wp-admin2,209 ▲245.88 ▲0.07102.09 ▲0.1440.20 ▲0.26
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0232.93 ▼5.9233.91 ▼1.84
Add New Post /wp-admin/post-new.php1,528 ▼523.44 ▲0.20622.96 ▼56.3355.57 ▼2.52
Media Library /wp-admin/upload.php1,385 ▲64.24 ▲0.04103.08 ▲0.6543.71 ▼0.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ftp-to-zip/backup.php
    • > /wp-content/plugins/ftp-to-zip/run.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      ZipArchive::close(): Read error: Is a directory in wp-content/plugins/ftp-to-zip/backup.php on line 86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (GUI matches with WordPress)
You can take inspiration from this readme.txt

ftp-to-zip/ftp-to-zip.php Passed 13 tests

The main file in "FTP to Zip" v. 1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
FTP to Zip takes browser based FTP backup of WordPress plus other folders.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected117 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36942117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.98KB17.37KB▼ 54.26%