82% debullient-post2pdf-pro

Code Review | Debullpost2pdf

WordPress plugin Debullpost2pdf scored82%from 54 tests.

About plugin

  • Plugin page: debullient-post2p...
  • Plugin version: 1.9.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Oct 16, 2018
  • Latest release: Oct 16, 2018
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: debullient (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼1.28ms] Passed 4 tests

Server-side resources used by Debullpost2pdf
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.35 ▲3.86
Dashboard /wp-admin3.57 ▲0.2750.58 ▼5.83
Posts /wp-admin/edit.php3.69 ▲0.3356.24 ▲4.55
Add New Post /wp-admin/post-new.php6.15 ▲0.2791.27 ▼7.71
Media Library /wp-admin/upload.php3.50 ▲0.2744.42 ▲4.93

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 800 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Debullpost2pdf
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15613.46 ▼1.159.22 ▲7.5445.10 ▲1.40
Dashboard /wp-admin2,208 ▲315.61 ▲0.0594.43 ▼0.3740.11 ▲1.31
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0140.90 ▲4.3736.72 ▼0.87
Add New Post /wp-admin/post-new.php1,539 ▼617.90 ▼5.12644.91 ▼43.4055.20 ▲1.40
Media Library /wp-admin/upload.php1,410 ▲104.25 ▲0.0493.69 ▼17.8145.01 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
Please take a closer look at the following
  • 146× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\SetHtmlPageFooter' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/SetHtmlPageHeader.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/IndexEntry.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_option() in wp-content/plugins/debullient-post2pdf-pro/templates/debullpost2pdf-header.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/Dl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/Bdi.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/TocEntry.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/Br.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\MpdfException' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/MpdfImageException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/debullient-post2pdf-pro/vendor/mpdf/mpdf/src/Tag/HGroup.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Front-end PDF Button), #2 (PDF Button settings), #3 (PDF Setup settings), #4 (PDF Header & Footer settings), #5 (PDF Custom CSS), #6 (Disable PDF Button Metabox)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

debullient-post2pdf-pro/debullpost2pdf.php 77% from 13 tests

The main PHP script in "Debullpost2pdf" version 1.9.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version does not match the one declared in readme.txt ("3.9.6" instead of "3.9")
  • Main file name: The principal plugin file should be the same as the plugin slug ("debullient-post2pdf-pro.php" instead of "debullpost2pdf.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected87,577 lines of code in 353 files:
LanguageFilesBlank linesComment linesLines of code
PHP3259,39510,46585,709
Markdown62160768
CSS48418459
JSON5290379
JavaScript7321496
PO File1252766
XML39066
YAML111031
Bourne Shell1203

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 7,591)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity79.82
▷ Minimum class complexity1.00
▷ Maximum class complexity7,591.00
Average method complexity16.49
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces22
Interfaces5
Traits2
Classes215
▷ Abstract classes73.26%
▷ Concrete classes20896.74%
▷ Final classes10.48%
Methods1,152
▷ Static methods827.12%
▷ Public methods99986.72%
▷ Protected methods332.86%
▷ Private methods12010.42%
Functions67
▷ Named functions6191.04%
▷ Anonymous functions68.96%
Constants392
▷ Global constants123.06%
▷ Class constants38096.94%
▷ Public constants380100.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