74% pdf-forms-for-wpforms

Code Review | PDF Forms Filler for WPForms

WordPress plugin PDF Forms Filler for WPForms scored74%from 54 tests.

About plugin

  • Plugin page: pdf-forms-for-wpf...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 18
  • Update frequency: every 23.7 days
  • Top authors: maximumsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,068 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.70MB] [CPU: ▲3.56ms] Passed 4 tests

A check of server-side resources used by PDF Forms Filler for WPForms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6839.35 ▼3.39
Dashboard /wp-admin4.00 ▲0.7049.60 ▲0.49
Posts /wp-admin/edit.php4.06 ▲0.7053.80 ▲9.22
Add New Post /wp-admin/post-new.php6.61 ▲0.72114.23 ▲16.00
Media Library /wp-admin/upload.php3.93 ▲0.7041.51 ▲7.90
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.0335.27

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 102 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PDF Forms Filler for WPForms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲8914.34 ▼0.051.63 ▼0.1040.60 ▼4.25
Dashboard /wp-admin2,235 ▲575.66 ▼0.0393.17 ▼18.4147.16 ▲2.75
Posts /wp-admin/edit.php2,158 ▲582.18 ▲0.1645.26 ▲9.4841.77 ▲7.31
Add New Post /wp-admin/post-new.php1,572 ▲4624.92 ▲1.68619.69 ▼75.0776.91 ▲25.40
Media Library /wp-admin/upload.php1,457 ▲634.26 ▲0.1296.81 ▼2.2646.15 ▲4.63
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9892.2226.6431.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/pdf-forms-for-wpforms/modules/downloads.php+167
    opendir(wp-content/uploads/pdf_forms_for_wpforms_downloads): failed to open dir: No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/pdf-forms-for-wpforms/inc/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'Pdf_Forms_For_WPForms_Service' not found in wp-content/plugins/pdf-forms-for-wpforms/modules/pdf-ninja.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/pdf-forms-for-wpforms/pdf-forms-for-wpforms.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/pdf-forms-for-wpforms/inc/class-tgm-plugin-activation.php:2109

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: pdf, download, attach, wpforms, filler...

pdf-forms-for-wpforms/pdf-forms-for-wpforms.php Passed 13 tests

"PDF Forms Filler for WPForms" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
136 characters long description:
Build WPForms from PDF forms. Get PDFs filled automatically and attached to email messages and/or website responses on form submissions.

Code Analysis 97% 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 detected9,496 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP89792,0474,172
PO File99721,0702,678
JavaScript655571422,075
CSS45510301
HTML4180270

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 145)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity59.00
▷ Minimum class complexity1.00
▷ Maximum class complexity352.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity145.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods235
▷ Static methods3715.74%
▷ Public methods18377.87%
▷ Protected methods239.79%
▷ Private methods2912.34%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin