77% ultimate-addons-for-contact-form-7

Code Review | Ultimate Addons for Contact Form 7

WordPress plugin Ultimate Addons for Contact Form 7 scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-addons-f...
  • Plugin version: 3.2.12
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 197
  • Update frequency: every 5.2 days
  • Top authors: psdtowpservice (97.97%)themefic (2.54%)

Code review

54 tests

User reviews

57 reviews

Install metrics

30,000+ active /387,560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.52ms] Passed 4 tests

A check of server-side resources used by Ultimate Addons for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.65 ▼2.36
Dashboard /wp-admin3.49 ▲0.1952.58 ▲2.60
Posts /wp-admin/edit.php3.61 ▲0.2555.48 ▲4.17
Add New Post /wp-admin/post-new.php6.08 ▲0.1997.28 ▼1.36
Media Library /wp-admin/upload.php3.42 ▲0.1934.48 ▲3.18

Server storage [IO: ▲10.31MB] [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: 716 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Ultimate Addons for Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6714.14 ▼0.211.57 ▼0.2736.13 ▼9.59
Dashboard /wp-admin2,234 ▲605.49 ▼0.0795.50 ▼6.0343.89 ▼1.90
Posts /wp-admin/edit.php2,143 ▲432.13 ▲0.1639.97 ▼4.0339.14 ▲0.80
Add New Post /wp-admin/post-new.php1,565 ▲3923.20 ▼0.19646.51 ▲6.8160.39 ▲10.90
Media Library /wp-admin/upload.php1,439 ▲394.17 ▼0.0098.46 ▲0.8745.21 ▲2.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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ultimate-addons-for-contact-form-7/addons/submission-id/ultimate-submission-id.php
    • > /wp-content/plugins/ultimate-addons-for-contact-form-7/addons/signature/ultimate-signature.php
  • 231× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Tag/FieldSet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Tag/TBody.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Tag/Hr.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Tag/Ol.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/AssetFetcher.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\Tcpdf\\Fpdi' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/setasign/fpdi/src/TcpdfFpdi.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Mpdf\\Language\\ScriptToLanguageInterface' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Language/ScriptToLanguage.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Image/ImageProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Td' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/mpdf/mpdf/src/Tag/Th.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'DeepCopy\\Matcher\\Matcher' not found in wp-content/plugins/ultimate-addons-for-contact-form-7/third-party/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 39 tag instead of maximum 10
You can look at the official readme.txt

ultimate-addons-for-contact-form-7/ultimate-addons-for-contact-form-7.php 85% from 13 tests

The main file in "Ultimate Addons for Contact Form 7" v. 3.2.12 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 231 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected109,978 lines of code in 542 files:
LanguageFilesBlank linesComment linesLines of code
PHP44513,75013,89285,636
SVG4009,792
CSS241,816625,322
PO File61,6742,2263,744
JavaScript254823212,611
Markdown1554301,535
JSON1100811
HTML12422253
YAML7584196
XML310075
Bourne Shell1203

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 7,024)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity53.95
▷ Minimum class complexity1.00
▷ Maximum class complexity7,024.00
Average method complexity11.55
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces50
Interfaces25
Traits6
Classes322
▷ Abstract classes92.80%
▷ Concrete classes31397.20%
▷ Final classes144.47%
Methods1,850
▷ Static methods1578.49%
▷ Public methods1,61687.35%
▷ Protected methods623.35%
▷ Private methods1729.30%
Functions54
▷ Named functions2750.00%
▷ Anonymous functions2750.00%
Constants433
▷ Global constants92.08%
▷ Class constants42497.92%
▷ Public constants424100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/country-dropdown/assets/img/flags.png64.41KB23.38KB▼ 63.70%
addons/country-dropdown/assets/img/flags@2x.png169.54KB64.26KB▼ 62.10%