67% file-away

Code Review | File Away

WordPress plugin File Away scored 67% from 54 tests.

About plugin

  • Plugin page: file-away
  • Plugin version: 3.9.9.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.1.1
  • WordPress version: 5.8.1
  • First release: Nov 7, 2013
  • Latest release: May 7, 2019
  • Number of updates: 553
  • Update frequency: every 3.6 days
  • Top authors: thomstark (100%)

Code review

54 tests

User reviews

119 reviews

Install metrics

10,000+ active / 164,495 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.38MB] [CPU: ▼142.19ms] Passed 4 tests

This is a short check of server-side resources used by File Away
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.9941.02 ▲22.41
Dashboard /wp-admin3.47 ▲0.4148.61 ▲5.26
Posts /wp-admin/edit.php3.52 ▲0.4145.26 ▼1.46
Add New Post /wp-admin/post-new.php5.77 ▲0.3385.82 ▼574.60
Media Library /wp-admin/upload.php3.35 ▲0.3533.58 ▲2.03

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

Filesystem and database footprint
These are issues you should consider
  • The plugin illegally modified 1 file (0.83KB) outside of "wp-content/plugins/file-away/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/file-away-iframe-template.php
Filesystem: 231 new files
Database: 2 new tables, 3 new options
New tables
wp_fileaway_downloads
wp_fileaway_metadata
New WordPress options
fileaway_options
fileaway_db2_version
fileaway_db_version

Browser metrics Passed 4 tests

Checking browser requirements for File Away
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,973 ▲37716.70 ▲1.1222.54 ▲13.4152.38 ▲2.20
Dashboard /wp-admin2,985 ▲515.88 ▼0.07135.44 ▼14.03152.99 ▲31.53
Posts /wp-admin/edit.php2,785 ▲462.76 ▼0.0564.46 ▼4.9792.69 ▲1.17
Add New Post /wp-admin/post-new.php1,708 ▲3618.40 ▼0.49378.29 ▼9.92116.52 ▼0.61
Media Library /wp-admin/upload.php1,841 ▲315.01 ▼0.03129.83 ▼27.78143.26 ▲18.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_fileaway_downloads
    • wp_fileaway_metadata
  • This plugin does not fully uninstall, leaving 3 options in the database
    • fileaway_options
    • fileaway_db_version
    • fileaway_db2_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 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
The following issues need your attention
  • 69× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_values.php
    • > /wp-content/plugins/file-away/lib/js/chosen/modal.chosen.js.php
    • > /wp-content/plugins/file-away/lib/inc/inc.filters.php
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_attributes.php
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_languages.php
    • > /wp-content/plugins/file-away/lib/inc/inc.thumbnails-setup.php
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_prints.php
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_management.php
    • > /wp-content/plugins/file-away/lib/inc/inc.icons.php
    • > /wp-content/plugins/file-away/lib/cls/class.fileaway_csv.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/file-away/templates/file-away-iframe-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/file-away/file-away.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25, #26 in file-away/assets to your readme.txt
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

file-away/file-away.php Passed 13 tests

"File Away" version 3.9.9.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
125 characters long description:
Upload, manage, and display files from your server directories or page attachments in stylized lists or sortable data tables.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected52,465 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP7302,81114,472
PO File384,9035,95613,848
JavaScript1511,51213,435
CSS12482998,431
SVG8112,279

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity67.61
▷ Minimum class complexity1.00
▷ Maximum class complexity444.00
Average method complexity10.66
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods193
▷ Static methods4121.24%
▷ Public methods15982.38%
▷ Protected methods31.55%
▷ Private methods3116.06%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
20 PNG files occupy 0.68MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/img/fileaway_values_banner.png104.59KB45.19KB▼ 56.79%
lib/img/other_plugins.png5.47KB1.69KB▼ 69.16%
lib/img/fileup_banner.png89.23KB36.16KB▼ 59.47%
lib/img/twitterfile.png10.25KB3.55KB▼ 65.38%
lib/img/eyesonly_banner.png23.35KB7.93KB▼ 66.04%