89% cf7-dropbox

Code Review | Contact Form 7 Dropbox

WordPress plugin Contact Form 7 Dropbox scored89%from 54 tests.

About plugin

  • Plugin page: cf7-dropbox
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2017
  • Latest release: Jan 2, 2019
  • Number of updates: 8
  • Update frequency: every 48.8 days
  • Top authors: jayswadas (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /5,764 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
Install script ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼17.32ms] Passed 4 tests

An overview of server-side resources used by Contact Form 7 Dropbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0724.02 ▼12.77
Dashboard /wp-admin3.20 ▼0.1433.40 ▼22.35
Posts /wp-admin/edit.php3.27 ▼0.0841.40 ▼8.51
Add New Post /wp-admin/post-new.php5.44 ▼0.4471.52 ▼25.66
Media Library /wp-admin/upload.php3.21 ▼0.0232.72 ▼1.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Dropbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.38 ▲0.023.26 ▲1.4938.91 ▲2.40
Dashboard /wp-admin2,198 ▲175.55 ▼0.1188.52 ▼19.6738.59 ▼0.46
Posts /wp-admin/edit.php2,107 ▲41.97 ▼0.0238.96 ▼1.8235.15 ▼0.16
Add New Post /wp-admin/post-new.php1,532 ▲623.08 ▼0.37665.56 ▲3.3565.49 ▼1.66
Media Library /wp-admin/upload.php1,406 ▲64.18 ▲0.0596.26 ▼4.2043.12 ▼2.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: dropbox, contact form dropbox, dropbox file upload, contact form 7 dropbox

cf7-dropbox/wpcf7-dropbox.php 85% from 13 tests

The main PHP file in "Contact Form 7 Dropbox" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-dropbox.php" instead of "wpcf7-dropbox.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.0.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin204 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13665168
JavaScript28036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected