90% cf7-mime-type-check

Code Review | Mime Type Check for Contact Form 7

WordPress plugin Mime Type Check for Contact Form 7 scored 90% from 54 tests.

About plugin

  • Plugin page: cf7-mime-type-check
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2021
  • Latest release: Oct 10, 2021
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: hmumarkhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 321 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.01MB] [CPU: ▼5.05ms] Passed 4 tests

A check of server-side resources used by Mime Type Check for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.30 ▼11.18
Dashboard /wp-admin3.31 ▲0.0145.91 ▲0.93
Posts /wp-admin/edit.php3.36 ▲0.0149.40 ▼3.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.57 ▼6.33
Media Library /wp-admin/upload.php3.23 ▲0.0136.33 ▲1.48

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Mime Type Check for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.64 ▼0.741.71 ▼0.3140.60 ▲0.48
Dashboard /wp-admin2,209 ▲214.86 ▲0.02116.41 ▲7.0743.70 ▲0.49
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0340.15 ▲0.0135.74 ▼2.18
Add New Post /wp-admin/post-new.php1,533 ▲1923.12 ▲5.60595.27 ▼109.5157.01 ▼1.51
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0597.35 ▼8.5444.31 ▼0.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: mimetype, cf7, file, validation

cf7-mime-type-check/cf7-mime-type-check.php Passed 13 tests

"Mime Type Check for Contact Form 7" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
105 characters long description:
This plugin will let you add the functionality in Contact Form 7 File fields to validate it by mime types

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
Success! There were no dangerous files found in this plugin326 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP661297326

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.33
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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