80% file-provider

Code Review | File Provider

WordPress plugin File Provider scored80%from 54 tests.

About plugin

  • Plugin page: file-provider
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.13-4.8.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Oct 17, 2017
  • Number of updates: 110
  • Update frequency: every 4.0 days
  • Top authors: dimdavid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,021 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.40ms] Passed 4 tests

This is a short check of server-side resources used by File Provider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.04 ▲2.85
Dashboard /wp-admin3.44 ▲0.1450.64 ▼4.66
Posts /wp-admin/edit.php3.55 ▲0.2053.58 ▲3.14
Add New Post /wp-admin/post-new.php6.02 ▲0.1496.84 ▼3.45
Media Library /wp-admin/upload.php3.36 ▲0.1438.80 ▼0.34
File Provider Options /wp-admin/options-general.php?page=file-provider-options3.3335.99

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: 2 new tables, 6 new options
New tables
wp_dfp_files
wp_dfp_group
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by File Provider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.121.86 ▲0.0944.79 ▼2.40
Dashboard /wp-admin2,199 ▲225.63 ▼0.0489.03 ▼10.1740.36 ▼4.71
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0238.69 ▲3.1537.15 ▼1.58
Add New Post /wp-admin/post-new.php1,529 ▼623.06 ▲4.74649.52 ▲6.2352.27 ▼18.42
Media Library /wp-admin/upload.php1,404 ▲74.28 ▲0.06103.24 ▲3.1441.15 ▼0.50
File Provider Options /wp-admin/options-general.php?page=file-provider-options9102.0322.2428.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_dfp_group
    • wp_dfp_files
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: file page, share, file provider, file, file manager...

file-provider/file-provider.php 92% from 13 tests

The main PHP script in "File Provider" version 1.2.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected972 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21089866
CSS113094
JavaScript10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity40.00
▷ Minimum class complexity15.00
▷ Maximum class complexity65.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods58
▷ Static methods11.72%
▷ Public methods2950.00%
▷ Protected methods1831.03%
▷ Private methods1118.97%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
15 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/txt.png3.42KB2.11KB▼ 38.26%
images/wav.png4.38KB2.27KB▼ 48.20%
images/png.png4.19KB2.11KB▼ 49.62%
images/xls.png4.08KB2.22KB▼ 45.72%
images/doc.png4.26KB2.38KB▼ 44.13%