84% multifile-upload-field-for-contact-form-7

Code Review | Multifile Upload Field for Contact Form 7

WordPress plugin Multifile Upload Field for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: multifile-upload-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.4
  • WordPress version: 6.3.1
  • First release: May 21, 2016
  • Latest release: Apr 27, 2017
  • Number of updates: 3
  • Update frequency: every 113.7 days
  • Top authors: spyrosvl (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

9,000+ active /45,013 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.06MB] [CPU: ▼10.18ms] Passed 4 tests

An overview of server-side resources used by Multifile Upload Field for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0745.38 ▲4.98
Dashboard /wp-admin3.37 ▲0.0344.21 ▼16.50
Posts /wp-admin/edit.php3.42 ▲0.0745.51 ▼2.82
Add New Post /wp-admin/post-new.php5.95 ▲0.0780.97 ▼23.50
Media Library /wp-admin/upload.php3.29 ▲0.0734.04 ▲2.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Multifile Upload Field for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.441.56 ▼0.2336.67 ▼5.71
Dashboard /wp-admin2,200 ▲95.84 ▲0.92102.75 ▲2.8039.47 ▲1.67
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0540.28 ▲3.1836.05 ▼1.71
Add New Post /wp-admin/post-new.php1,542 ▲818.45 ▼4.75593.92 ▼41.4250.65 ▲2.24
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.0094.70 ▼3.5142.11 ▲0.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multifile-upload-field-for-contact-form-7/multifile-for-contact-form-7.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt might help

multifile-upload-field-for-contact-form-7/multifile-for-contact-form-7.php 92% from 13 tests

The entry point to "Multifile Upload Field for Contact Form 7" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("multifile-upload-field-for-contact-form-7.php" instead of "multifile-for-contact-form-7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin267 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111680267

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.59KB13.25KB▼ 68.88%