63% shared-files

Code Review | Shared Files – Advanced File Sharing & Download Manager with Frontend Uploads & Lead Generation

WordPress plugin Shared Files – Advanced File Sharing & Download Manager with Frontend Uploads & Lead Generation scored63%from 54 tests.

About plugin

  • Plugin page: shared-files
  • Plugin version: 1.7.10
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 13, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 353
  • Update frequency: every 5.6 days
  • Top authors: anssilaitila (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

2,000+ active /120,269 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.61MB] [CPU: ▲31.69ms] 75% from 4 tests

An overview of server-side resources used by Shared Files – Advanced File Sharing & Download Manager with Frontend Uploads & Lead Generation
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.61MB on /wp-admin/edit.php?post_type=shared_file&page=shared-files-sync-files)
PageMemory (MB)CPU Time (ms)
Home /8.96 ▲5.5069.08 ▲26.23
Dashboard /wp-admin8.98 ▲5.6887.33 ▲37.07
Posts /wp-admin/edit.php9.02 ▲5.6692.72 ▲46.65
Add New Post /wp-admin/post-new.php11.51 ▲5.62123.94 ▲20.09
Media Library /wp-admin/upload.php8.98 ▲5.7576.00 ▲43.37
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.0777.40
Shortcodes /wp-admin/edit.php?post_type=shared_file&page=shared-files-shortcodes8.9869.98
Add New /wp-admin/post-new.php?post_type=shared_file9.0393.08
Shared Files /wp-admin/options-general.php?page=shared-files9.0675.29
Categories /wp-admin/edit.php?post_type=shared_file&page=shared-files-categories-info8.9870.90
Statistics /wp-admin/edit.php?post_type=shared_file&page=shared-files-statistics8.9869.22
File Management /wp-admin/edit.php?post_type=shared_file8.9874.88
Settings  ➤ /wp-admin/edit.php?post_type=shared_file&page=./options-general.php?page=shared-files8.9858.87
Download log /wp-admin/edit.php?post_type=shared_file&page=shared-files-download-log8.9874.08
Sync Files /wp-admin/edit.php?post_type=shared_file&page=shared-files-sync-files8.9867.64

Server storage [IO: ▲5.29MB] [DB: ▲0.08MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 385 new files
Database: 3 new tables, 12 new options
New tables
wp_shared_files_log
wp_shared_files_contacts
wp_shared_files_download_log
New WordPress options
db_upgraded
fs_active_plugins
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
fs_debug_mode
shared_files_version
shared_files_settings
shared-files-sc
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Shared Files – Advanced File Sharing & Download Manager with Frontend Uploads & Lead Generation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲23113.83 ▼0.449.80 ▲8.1226.88 ▼17.35
Dashboard /wp-admin2,305 ▲1255.59 ▼0.0191.88 ▼1.9347.79 ▲1.88
Posts /wp-admin/edit.php2,211 ▲1112.03 ▲0.0837.85 ▼3.2537.00 ▼0.30
Add New Post /wp-admin/post-new.php1,603 ▲7722.92 ▼0.80676.24 ▲25.9163.40 ▼1.00
Media Library /wp-admin/upload.php1,510 ▲1074.39 ▲0.1498.80 ▲0.9846.97 ▲5.71
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1751.7028.4133.46
Shortcodes /wp-admin/edit.php?post_type=shared_file&page=shared-files-shortcodes1,9381.8631.4772.02
Add New /wp-admin/post-new.php?post_type=shared_file2,4206.88156.3275.92
Shared Files /wp-admin/options-general.php?page=shared-files1,1121.7027.5751.94
Categories /wp-admin/edit.php?post_type=shared_file&page=shared-files-categories-info8961.7826.5137.11
Statistics /wp-admin/edit.php?post_type=shared_file&page=shared-files-statistics9061.6726.9535.02
File Management /wp-admin/edit.php?post_type=shared_file1,3992.1937.2646.66
Settings  ➤ /wp-admin/edit.php?post_type=shared_file&page=./options-general.php?page=shared-files280.410.083.68
Download log /wp-admin/edit.php?post_type=shared_file&page=shared-files-download-log9511.6927.7835.95
Sync Files /wp-admin/edit.php?post_type=shared_file&page=shared-files-sync-files9091.7026.6337.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/shared-files/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 3 tables
    • wp_shared_files_log
    • wp_shared_files_contacts
    • wp_shared_files_download_log
  • Zombie WordPress options were found after uninstall: 12 options
    • fs_active_plugins
    • fs_accounts
    • shared_files_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_debug_mode
    • db_upgraded
    • widget_recent-posts
    • shared_files_settings
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=shared_file&page=./options-general.php?page=shared-files
    • > Network (severe)
    wp-admin/edit.php?post_type=shared_file&page=./options-general.php?page=shared-files - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

shared-files/shared-files.php Passed 13 tests

The entry point to "Shared Files – Advanced File Sharing & Download Manager with Frontend Uploads & Lead Generation" version 1.7.10 is a PHP file that has certain tags in its header comment area
68 characters long description:
A simple yet effective tool to list downloadable files on your site.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin56,381 lines of code in 302 files:
LanguageFilesBlank linesComment linesLines of code
PHP17110,01818,43543,306
JavaScript722,63285210,165
PO File59081,4722,239
CSS22667569
SVG312172
XML111930

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity57.20
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes103
▷ Abstract classes21.94%
▷ Concrete classes10198.06%
▷ Final classes00.00%
Methods1,466
▷ Static methods27018.42%
▷ Public methods1,05872.17%
▷ Protected methods171.16%
▷ Private methods39126.67%
Functions109
▷ Named functions10899.08%
▷ Anonymous functions10.92%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.48MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/gif.png15.34KB1.19KB▼ 92.23%
img/mov.png2.82KB0.53KB▼ 81.14%
img/aj.png15.93KB1.39KB▼ 91.28%
img/category-password-protection.png171.91KB112.15KB▼ 34.76%
img/avi.png2.82KB0.53KB▼ 81.14%