83% file-manager-advanced

Code Review | Advanced File Manager

WordPress plugin Advanced File Manager scored83%from 54 tests.

About plugin

  • Plugin page: file-manager-adva...
  • Plugin version: 5.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2017
  • Latest release: Sep 10, 2023
  • Number of updates: 163
  • Update frequency: every 13.9 days
  • Top authors: modalweb (100%)

Code review

54 tests

User reviews

362 reviews

Install metrics

100,000+ active /2,368,552 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.17ms] Passed 4 tests

This is a short check of server-side resources used by Advanced File Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.09 ▲3.53
Dashboard /wp-admin3.44 ▲0.1357.61 ▲3.66
Posts /wp-admin/edit.php3.55 ▲0.1951.81 ▼4.79
Add New Post /wp-admin/post-new.php6.02 ▲0.1396.52 ▲6.27
Media Library /wp-admin/upload.php3.36 ▲0.1345.38 ▲10.79
Shortcodes /wp-admin/admin.php?page=file_manager_advanced_shortcodes3.3636.36
Settings /wp-admin/admin.php?page=file_manager_advanced_controls3.3836.56
File Manager /wp-admin/admin.php?page=file_manager_advanced_ui3.4135.16

Server storage [IO: ▲8.62MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/file-manager-advanced/" and "wp-content/uploads/"
    • (new file) .tmb/.empty
Filesystem: 687 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced File Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.25 ▲0.121.74 ▼0.0143.24 ▲1.48
Dashboard /wp-admin2,209 ▲325.64 ▲0.1280.93 ▼9.9770.62 ▲25.52
Posts /wp-admin/edit.php2,132 ▲292.01 ▲0.0438.60 ▼1.1434.51 ▼2.17
Add New Post /wp-admin/post-new.php1,571 ▲3918.35 ▼4.80669.25 ▲53.1451.86 ▼3.68
Media Library /wp-admin/upload.php1,429 ▲354.16 ▼0.0798.70 ▼10.9973.80 ▲25.00
Shortcodes /wp-admin/admin.php?page=file_manager_advanced_shortcodes1,7512.0125.4842.34
Settings /wp-admin/admin.php?page=file_manager_advanced_controls1,3012.1623.3529.26
File Manager /wp-admin/admin.php?page=file_manager_advanced_ui4,0865.29206.7197.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeDriver' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeDropbox2.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderPlugin' not found in wp-content/plugins/file-manager-advanced/application/library/php/plugins/AutoResize/plugin.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderPlugin' not found in wp-content/plugins/file-manager-advanced/application/library/php/plugins/Sanitizer/plugin.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeFTP' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeSFTPphpseclib.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderPlugin' not found in wp-content/plugins/file-manager-advanced/application/library/php/plugins/AutoRotate/plugin.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeMySQL' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeTrashMySQL.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeDriver' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeGoogleDrive.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderEditor' not found in wp-content/plugins/file-manager-advanced/application/library/php/editors/OnlineConvert/editor.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeDriver' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeLocalFileSystem.class.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'elFinderVolumeDriver' not found in wp-content/plugins/file-manager-advanced/application/library/php/elFinderVolumeGroup.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

file-manager-advanced/file_manager_advanced.php 92% from 13 tests

"Advanced File Manager" version 5.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("file-manager-advanced.php" instead of "file_manager_advanced.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin152,383 lines of code in 568 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28512,88212,907105,112
PHP413,0048,98619,124
HTML1282,509813,351
CSS351,17972411,734
SVG719102,776
PO File14851151
Markdown520059
SQL13044
JSON10032

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,400)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 150)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity132.21
▷ Minimum class complexity1.00
▷ Maximum class complexity1,400.00
Average method complexity7.42
▷ Minimum method complexity1.00
▷ Maximum method complexity150.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes37
▷ Abstract classes12.70%
▷ Concrete classes3697.30%
▷ Final classes00.00%
Methods810
▷ Static methods485.93%
▷ Public methods25531.48%
▷ Protected methods54066.67%
▷ Private methods151.85%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants101
▷ Global constants2423.76%
▷ Class constants7776.24%
▷ Public constants77100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
84 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
application/library/img/icons-big.png6.72KB7.17KB0.00%
application/library/img/trashmesh.png0.16KB0.17KB0.00%
application/library/php/plugins/Watermark/logo.png8.72KB5.11KB▼ 41.43%
application/library/themes/windows10/images/16px/directory_opened.png1.10KB1.15KB0.00%
application/library/themes/windows10/images/16px/upload.png0.44KB0.50KB0.00%