51% pdf-builder-for-wpforms

Code Review | PDF Builder for WPForms

WordPress plugin PDF Builder for WPForms scored51%from 54 tests.

About plugin

  • Plugin page: pdf-builder-for-w...
  • Plugin version: 1.2.81
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 184
  • Update frequency: every 9.2 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /51,617 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.48MB] [CPU: ▼2.35ms] Passed 4 tests

Analyzing server-side resources used by PDF Builder for WPForms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5242.35 ▲0.67
Dashboard /wp-admin3.83 ▲0.4848.89 ▼13.82
Posts /wp-admin/edit.php3.88 ▲0.5255.38 ▲7.15
Add New Post /wp-admin/post-new.php6.35 ▲0.4693.30 ▼3.40
Media Library /wp-admin/upload.php3.69 ▲0.4640.50 ▲7.29
Entries /wp-admin/admin.php?page=rednaopdfwpform_pdf_builder_entries3.6534.02
WPForm PDF Builder /wp-admin/admin.php?page=rednaopdfwpform_pdf_builder3.6638.04
Our WPForms Plugins /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins3.6637.25

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 617 new files
Database: 5 new tables, 7 new options
New tables
wp_rednaopdfwpform_form_config
wp_rednaopdfwpform_links
wp_rednaopdfwpform_templates
wp_rednaopdfwpform_custom_field
wp_rednaopdfwpform_records
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
rednao_rednaopdfwpform_db_version
db_upgraded

Browser metrics Passed 4 tests

PDF Builder for WPForms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3414.26 ▼0.491.69 ▼0.1940.26 ▼4.11
Dashboard /wp-admin2,226 ▲495.62 ▼0.0990.03 ▼10.0641.42 ▼5.47
Posts /wp-admin/edit.php2,131 ▲281.97 ▼0.0042.61 ▲3.8435.79 ▼1.88
Add New Post /wp-admin/post-new.php1,552 ▲1623.02 ▼0.10618.90 ▼22.3654.06 ▼7.80
Media Library /wp-admin/upload.php1,434 ▲344.16 ▼0.0597.01 ▲0.6442.35 ▲1.36
Entries /wp-admin/admin.php?page=rednaopdfwpform_pdf_builder_entries8202.1722.7824.10
WPForm PDF Builder /wp-admin/admin.php?page=rednaopdfwpform_pdf_builder9263.1961.5932.29
Our WPForms Plugins /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins1,1061.9722.9127.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_rednaopdfwpform_templates
    • wp_rednaopdfwpform_custom_field
    • wp_rednaopdfwpform_links
    • wp_rednaopdfwpform_form_config
    • wp_rednaopdfwpform_records
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • rednao_rednaopdfwpform_db_version
    • theysaidso_admin_options

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pdf-builder-for-wpforms/Pages/AdditionalPlugins.php
    • > /wp-content/plugins/pdf-builder-for-wpforms/vendor/sabberworm/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/pdf-builder-for-wpforms/Pages/PDFBuilder.php
    • > /wp-content/plugins/pdf-builder-for-wpforms/vendor/phpqrcode/index.php
  • 289× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/dompdf/dompdf/src/Renderer/TableCell.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/dompdf/dompdf/src/FrameReflower/ListBullet.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\CSSFunction' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Color.php:5
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/pdf-builder-for-wpforms/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 53
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/phenx/php-svg-lib/src/Svg/Document.php:30
    • > PHP Warning
      include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pdf-builder-for-wpforms/vendor/printnode/printnode-php/examples/example-3-manipulating-child-accounts.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoformpdfbuilder\\Integration\\Processors\\Entry\\EntryItems\\EntryItemBase' not found in wp-content/plugins/pdf-builder-for-wpforms/Integration/Adapters/WPForm/Entry/EntryItems/WPFormAddressEntryItem.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/phenx/php-svg-lib/src/Svg/Tag/Stop.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/pdf-builder-for-wpforms/vendor/dompdf/dompdf/src/Positioner/Inline.php:21
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/pdf-builder-for-wpforms/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/pagebuilder.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/wpform.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/stp128.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/pdfbuilder.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/repeater.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/calculation.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=rednaopdfwpform_additional_plugins
    • > Network (severe)
    wp-content/plugins/pdf-builder-for-wpforms/images/adicons/format_number.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: forms, wpforms, wpform, pdf, pdf builder

pdf-builder-for-wpforms/rednaopdfwpform.php 77% from 13 tests

Analyzing the main PHP file in "PDF Builder for WPForms" version 1.2.81
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pdf-builder-for-wpforms.php" instead of "rednaopdfwpform.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/pdf-builder-for-wpforms/vendor/phpqrcode/tools/merge.bat
116,765 lines of code in 488 files:
LanguageFilesBlank linesComment linesLines of code
PHP37013,65721,13595,549
JavaScript181,9561,64612,332
CSS472511734,121
SVG14072,740
Markdown1031801,029
JSON1510641
XML6714218
YAML4192108
HTML10017
TypeScript1006
Bourne Shell1002
DOS Batch1002

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,487)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity31.35
▷ Minimum class complexity1.00
▷ Maximum class complexity1,487.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces71
Interfaces7
Traits0
Classes357
▷ Abstract classes257.00%
▷ Concrete classes33293.00%
▷ Final classes00.00%
Methods3,114
▷ Static methods2738.77%
▷ Public methods2,60683.69%
▷ Protected methods32510.44%
▷ Private methods1835.88%
Functions30
▷ Named functions723.33%
▷ Anonymous functions2376.67%
Constants431
▷ Global constants10524.36%
▷ Class constants32675.64%
▷ Public constants326100.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
31 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/temporalImage-107x107.png13.46KB6.59KB▼ 51.05%
images/adIcons/calculation.png1.66KB1.23KB▼ 25.84%
images/toolIcons/text.png2.97KB0.27KB▼ 91.03%
images/toolIcons/qrcode.png0.54KB0.48KB▼ 11.73%
images/toolIcons/link.png2.04KB1.46KB▼ 28.24%