10% fluentforms-pdf

Code Review | PDF Generator For Fluent Forms - The Contact Form Plugin

WordPress plugin PDF Generator For Fluent Forms - The Contact Form Plugin scored10%from 54 tests.

About plugin

  • Plugin page: fluentforms-pdf
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Jun 22, 2023
  • Number of updates: 12
  • Update frequency: every 95.8 days
  • Top authors: adreastrian (75%)wpmanageninja (33.33%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10,000+ active /84,247 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/fluentforms-pdf/Classes/Controller/AvailableOptions.php+214
    Use of undefined constant FLUENTFORM_FRAMEWORK_UPGRADE - assumed 'FLUENTFORM_FRAMEWORK_UPGRADE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.82ms] Passed 4 tests

Analyzing server-side resources used by PDF Generator For Fluent Forms - The Contact Form Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.95 ▼0.21
Dashboard /wp-admin3.33 ▲0.0349.83 ▲0.98
Posts /wp-admin/edit.php3.38 ▲0.0356.04 ▲5.51
Add New Post /wp-admin/post-new.php5.91 ▲0.03109.47 ▲16.38
Media Library /wp-admin/upload.php3.25 ▲0.0337.50 ▲0.99

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

Browser metrics Passed 4 tests

An overview of browser requirements for PDF Generator For Fluent Forms - The Contact Form Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.68 ▼0.511.75 ▼0.2643.83 ▲0.39
Dashboard /wp-admin2,213 ▲255.85 ▲0.97104.07 ▼5.2438.87 ▼5.57
Posts /wp-admin/edit.php2,095 ▲92.17 ▲0.1740.28 ▲2.1437.87 ▲4.34
Add New Post /wp-admin/post-new.php1,549 ▲3018.40 ▼4.72636.23 ▲27.9453.74 ▼0.34
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0298.94 ▲0.4341.84 ▼0.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/fluentforms-pdf/Classes/Controller/AvailableOptions.php+214
    Use of undefined constant FLUENTFORM_FRAMEWORK_UPGRADE - assumed 'FLUENTFORM_FRAMEWORK_UPGRADE' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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 50% from 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
Please fix the following
  • 211× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\SubstituteTag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/Ttz.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/Table.php:8
    • > PHP Fatal error
      Trait 'Mpdf\\Strict' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Writer/ObjectWriter.php on line 9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/data/CJKdata.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/fluentforms-pdf/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DeepCopy\\TypeFilter\\TypeFilter' not found in wp-content/plugins/fluentforms-pdf/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/IndexEntry.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/DotTab.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/IndexInsert.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/fluentforms-pdf/vendor/mpdf/mpdf/src/Tag/S.php:5

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)
No browser issues were found

Optimizations

Plugin configuration 93% 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: You can take inspiration from this readme.txt

fluentforms-pdf/fluentforms-pdf.php 92% from 13 tests

The principal PHP file in "PDF Generator For Fluent Forms - The Contact Form Plugin" v. 1.1.7 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected78,142 lines of code in 403 files:
LanguageFilesBlank linesComment linesLines of code
PHP38910,78111,58076,372
Markdown21280621
JSON200573
CSS26518405
XML311073
YAML211349
JavaScript210146
Bourne Shell1203

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 7,007)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity59.39
▷ Minimum class complexity1.00
▷ Maximum class complexity7,007.00
Average method complexity13.62
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces46
Interfaces10
Traits6
Classes286
▷ Abstract classes103.50%
▷ Concrete classes27696.50%
▷ Final classes134.71%
Methods1,408
▷ Static methods15010.65%
▷ Public methods1,21586.29%
▷ Protected methods584.12%
▷ Private methods1359.59%
Functions35
▷ Named functions617.14%
▷ Anonymous functions2982.86%
Constants430
▷ Global constants81.86%
▷ Class constants42298.14%
▷ Public constants422100.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
8 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/myclabs/deep-copy/doc/deep-clone.png13.68KB6.54KB▼ 52.22%
assets/images/tabular.png22.77KB11.37KB▼ 50.06%
vendor/myclabs/deep-copy/doc/clone.png12.09KB5.48KB▼ 54.70%
assets/images/banner-white.png50.76KB25.05KB▼ 50.65%
assets/images/basic_template.png5.62KB1.79KB▼ 68.08%