77% waterwoo-pdf

Code Review | WaterMark PDF for WooCommerce - Stamp PDFs with Customer Data

WordPress plugin WaterMark PDF for WooCommerce - Stamp PDFs with Customer Data scored77%from 54 tests.

About plugin

  • Plugin page: waterwoo-pdf
  • Plugin version: 3.3.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 25, 2014
  • Latest release: Nov 27, 2023
  • Number of updates: 194
  • Update frequency: every 17.1 days
  • Top authors: littlepackage (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

1,000+ active /50,229 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.62ms] Passed 4 tests

Analyzing server-side resources used by WaterMark PDF for WooCommerce - Stamp PDFs with Customer Data
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.67 ▼2.47
Dashboard /wp-admin3.33 ▲0.0345.41 ▼7.25
Posts /wp-admin/edit.php3.39 ▲0.0349.55 ▲0.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.21 ▼7.78
Media Library /wp-admin/upload.php3.26 ▲0.0333.53 ▼0.99

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

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

Browser metrics Passed 4 tests

WaterMark PDF for WooCommerce - Stamp PDFs with Customer Data: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.07 ▼0.711.59 ▲0.0740.69 ▼0.49
Dashboard /wp-admin2,204 ▲375.64 ▼0.0191.16 ▼22.2841.24 ▼3.61
Posts /wp-admin/edit.php2,109 ▲62.01 ▲0.0639.24 ▲3.2937.38 ▲3.70
Add New Post /wp-admin/post-new.php1,535 ▲923.67 ▲0.55609.92 ▼77.1748.35 ▼13.82
Media Library /wp-admin/upload.php1,406 ▲64.17 ▼0.05108.54 ▼3.9747.67 ▲1.71

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/waterwoo-pdf/lib/tcpdf/tcpdf/tools/tcpdf_addfont.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'LittlePackage\\lib\\TCPDF_Child' not found in wp-content/plugins/waterwoo-pdf/lib/tcpdi/fpdf_tpl.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/waterwoo-pdf/lib/tcpdf/tcpdf/tcpdf_import.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

waterwoo-pdf/waterwoo-pdf.php 92% from 13 tests

The entry point to "WaterMark PDF for WooCommerce - Stamp PDFs with Customer Data" version 3.3.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "4.0")

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 detected49,605 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP491,95112,65548,839
PO File3317919703
Markdown121063

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,422)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 500)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity291.54
▷ Minimum class complexity1.00
▷ Maximum class complexity4,422.00
Average method complexity9.66
▷ Minimum method complexity1.00
▷ Maximum method complexity500.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods805
▷ Static methods11013.66%
▷ Public methods50262.36%
▷ Protected methods28835.78%
▷ Private methods151.86%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants120
▷ Global constants120100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin