90% html-to-pdf-converter

Code Review | HTML to PDF Converter

WordPress plugin HTML to PDF Converter scored90%from 54 tests.

About plugin

  • Plugin page: html-to-pdf-conve...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 22, 2023
  • Latest release: Nov 7, 2023
  • Number of updates: 19
  • Update frequency: every 2.6 days
  • Top authors: html2pdfapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.27ms] Passed 4 tests

An overview of server-side resources used by HTML to PDF Converter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.20 ▼6.40
Dashboard /wp-admin3.37 ▲0.0645.82 ▼7.37
Posts /wp-admin/edit.php3.42 ▲0.0649.98 ▲3.60
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.00 ▼11.01
Media Library /wp-admin/upload.php3.29 ▲0.0633.37 ▼0.28
HTML to PDF /wp-admin/options-general.php?page=html2pdf_settings3.2732.03

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for HTML to PDF Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲2214.24 ▼0.101.56 ▼0.4237.83 ▼6.54
Dashboard /wp-admin2,202 ▲315.62 ▼0.0490.56 ▼11.3641.80 ▼2.76
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0838.73 ▼0.0735.34 ▼0.55
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▲0.34616.39 ▼33.7154.58 ▼2.13
Media Library /wp-admin/upload.php1,401 ▲14.20 ▲0.0596.43 ▼12.8043.07 ▲0.27
HTML to PDF /wp-admin/options-general.php?page=html2pdf_settings1,0182.0021.8328.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

html-to-pdf-converter/html-to-pdf-converter.php Passed 13 tests

The main PHP file in "HTML to PDF Converter" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
A plugin that converts WordPress pages or posts to PDF using html2pdf.app API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected218 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11514182
Markdown120036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin