83% store-file-uploads-for-contact-form-7

Code Review | Store file uploads for Contact Form 7

WordPress plugin Store file uploads for Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: store-file-upload...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2020
  • Latest release: Mar 19, 2022
  • Number of updates: 12
  • Update frequency: every 62.5 days
  • Top authors: mirceatm (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /8,137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.76ms] Passed 4 tests

Server-side resources used by Store file uploads for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.53 ▼3.26
Dashboard /wp-admin3.32 ▲0.0146.89 ▼1.77
Posts /wp-admin/edit.php3.37 ▲0.0143.55 ▼1.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.59 ▲4.84
Media Library /wp-admin/upload.php3.24 ▲0.0134.85 ▼0.96

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Store file uploads for Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▲0.351.67 ▲0.0844.35 ▲7.93
Dashboard /wp-admin2,192 ▲115.52 ▼0.2083.68 ▼17.4737.80 ▼3.59
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0734.31 ▼1.5734.10 ▼5.69
Add New Post /wp-admin/post-new.php1,535 ▲618.38 ▼5.20599.42 ▼67.1076.89 ▲16.18
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.0497.80 ▼0.5640.86 ▼5.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/store-file-uploads-for-contact-form-7/store-file-uploads-for-contact-form-7.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

store-file-uploads-for-contact-form-7/store-file-uploads-for-contact-form-7.php 85% from 13 tests

The primary PHP file in "Store file uploads for Contact Form 7" version 1.2.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161943

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin