10% simple-ftp-directory-lister

Code Review | Simple FTP Directory Lister

WordPress plugin Simple FTP Directory Lister scored10%from 54 tests.

About plugin

  • Plugin page: simple-ftp-direct...
  • Plugin version: 1.4.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Feb 17, 2020
  • Latest release: May 4, 2022
  • Number of updates: 28
  • Update frequency: every 28.8 days
  • Top authors: jakeob (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /6,100 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/simple-ftp-directory-lister/simple-ftp-directory-lister.php+25
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼61.18ms] Passed 4 tests

A check of server-side resources used by Simple FTP Directory Lister
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.54 ▼41.06
Dashboard /wp-admin2.05 ▼1.266.46 ▼49.72
Posts /wp-admin/edit.php2.05 ▼1.314.69 ▼49.16
Add New Post /wp-admin/post-new.php2.05 ▼3.846.43 ▼104.76
Media Library /wp-admin/upload.php2.05 ▼1.185.34 ▼28.50
Simple FTP Directory Lister Settings /wp-admin/options-general.php?page=sfdl-admin2.056.02

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple FTP Directory Lister
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.28 ▲0.021.66 ▼0.1844.36 ▼0.90
Dashboard /wp-admin2,199 ▲195.57 ▼0.0387.40 ▼4.0738.97 ▲1.45
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0237.48 ▼3.6735.96 ▲4.37
Add New Post /wp-admin/post-new.php1,531 ▼022.89 ▼0.18638.35 ▲2.2853.52 ▼19.21
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.06103.51 ▼2.5944.22 ▲0.44
Simple FTP Directory Lister Settings /wp-admin/options-general.php?page=sfdl-admin9522.0130.2839.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/simple-ftp-directory-lister/simple-ftp-directory-lister.php+25
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sfdl-admin
    • > Notice in wp-content/plugins/simple-ftp-directory-lister/simple-ftp-directory-lister.php+29
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-ftp-directory-lister/assets/sfdl-options.php:346
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-ftp-directory-lister/assets/sfdl-options.php:346

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === simple-ftp-directory-lister === )
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in simple-ftp-directory-lister/assets to your readme.txt
You can look at the official readme.txt

simple-ftp-directory-lister/simple-ftp-directory-lister.php 85% from 13 tests

This is the main PHP file of "Simple FTP Directory Lister" version 1.4.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.1" instead of "5.2")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7,727 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,0131,8286,921
PHP210965439
CSS5686367

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin