77% download-pdf-after-submit-form

Code Review | Download PDF After Submit Form

WordPress plugin Download PDF After Submit Form scored77%from 54 tests.

About plugin

  • Plugin page: download-pdf-afte...
  • Plugin version: 2.2.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2022
  • Latest release: Nov 10, 2023
  • Number of updates: 10
  • Update frequency: every 51.2 days
  • Top authors: shahinurislam (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /4,061 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by Download PDF After Submit Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.11 ▲7.99
Dashboard /wp-admin3.39 ▲0.0551.89 ▼4.25
Posts /wp-admin/edit.php3.44 ▲0.0945.74 ▲0.65
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.21 ▼10.44
Media Library /wp-admin/upload.php3.32 ▲0.0936.03 ▲1.28
View Entries /wp-admin/edit.php?post_type=infomat3.3635.76
Add New /wp-admin/post-new.php?post_type=infomat3.3539.72
Settings /wp-admin/edit.php?post_type=infomat&page=settings3.2830.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Download PDF After Submit Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14813.75 ▼0.599.55 ▲7.9144.91 ▲8.02
Dashboard /wp-admin2,231 ▲535.59 ▼0.1289.39 ▼22.0541.23 ▼1.07
Posts /wp-admin/edit.php2,133 ▲302.03 ▲0.0335.94 ▼6.0632.73 ▼2.17
Add New Post /wp-admin/post-new.php1,553 ▲2622.91 ▼0.19622.51 ▼23.3944.61 ▼11.67
Media Library /wp-admin/upload.php1,433 ▲334.23 ▲0.0597.86 ▼4.9443.99 ▲0.90
View Entries /wp-admin/edit.php?post_type=infomat1,1121.9038.1829.98
Add New /wp-admin/post-new.php?post_type=infomat1,4502.4446.9947.23
Settings /wp-admin/edit.php?post_type=infomat&page=settings2,23014.94489.6380.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-pdf-after-submit-form/include/enqueue.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-pdf-after-submit-form/include/posttype.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=infomat&page=settings
    • > Network (severe)
    wp-content/plugins/download-pdf-after-submit-form//images/custom-gif.gif) - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=infomat&page=settings
    • > Other (warning) in unknown
    /wp-admin/edit.php?post_type=infomat&page=settings 210 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

download-pdf-after-submit-form/index.php 69% from 13 tests

The main PHP script in "Download PDF After Submit Form" version 2.2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("download-pdf-after-submit-form.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,106 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS26416580
PHP32353421
Markdown1590104
JavaScript1021

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom.png14.04KB5.32KB▼ 62.11%
images/premium.png11.84KB5.25KB▼ 55.67%
images/classic.png11.41KB4.52KB▼ 60.35%
images/mordan.png11.92KB4.57KB▼ 61.69%