89% drag-and-drop-multiple-file-upload-contact-form-7

Code Review | Drag and Drop Multiple File Upload - Contact Form 7

WordPress plugin Drag and Drop Multiple File Upload - Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: drag-and-drop-mul...
  • Plugin version: 1.3.7.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2018
  • Latest release: Nov 1, 2023
  • Number of updates: 116
  • Update frequency: every 15.5 days
  • Top authors: glenwpcoder (100%)

Code review

54 tests

User reviews

86 reviews

Install metrics

50,000+ active /579,069 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.88ms] 75% from 4 tests

Server-side resources used by Drag and Drop Multiple File Upload - Contact Form 7
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 529.81ms on /wp-admin/admin.php?page=drag-n-drop-upload)
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1044.34 ▼3.65
Dashboard /wp-admin3.36 ▲0.0250.25 ▼9.78
Posts /wp-admin/edit.php3.42 ▲0.0647.38 ▼1.29
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.00 ▼12.80
Media Library /wp-admin/upload.php3.29 ▲0.0636.55 ▲2.58
Drag & Drop Upload /wp-admin/admin.php?page=drag-n-drop-upload3.72529.81

Server storage [IO: ▲0.18MB] [DB: ▲0.05MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Drag and Drop Multiple File Upload - Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.37 ▼0.241.67 ▲0.0644.55 ▲1.36
Dashboard /wp-admin2,195 ▲155.63 ▼0.0392.52 ▼6.5642.06 ▼3.77
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0636.55 ▼0.6533.92 ▲2.76
Add New Post /wp-admin/post-new.php1,538 ▲1223.03 ▼0.35640.24 ▼63.2952.16 ▼5.87
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0496.26 ▼1.4942.78 ▼1.70
Drag & Drop Upload /wp-admin/admin.php?page=drag-n-drop-upload1,7772.0123.2937.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: drag and drop, multiple file, upload, contact form 7, contact form 7 uploader...

drag-and-drop-multiple-file-upload-contact-form-7/drag-n-drop-upload-cf7.php 92% from 13 tests

Analyzing the main PHP file in "Drag and Drop Multiple File Upload - Contact Form 7" version 1.3.7.4
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 ("drag-and-drop-multiple-file-upload-contact-form-7.php" instead of "drag-n-drop-upload-cf7.php")

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
Success! There were no dangerous files found in this plugin2,796 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP42652211,744
PO File6194195544
JavaScript2127115375
CSS11311133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin