10% doublewp-tcpdf-wrapper

Code Review | DoublewP TCPDF Wrapper

WordPress plugin DoublewP TCPDF Wrapper scored10%from 54 tests.

About plugin

  • Plugin page: doublewp-tcpdf-wr...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Apr 25, 2020
  • Latest release: Apr 25, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: doublewp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /943 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/doublewp-tcpdf-wrapper/includes/class-tcpdf-wrapper.php+102
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.29ms] Passed 4 tests

This is a short check of server-side resources used by DoublewP TCPDF Wrapper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.70 ▼34.11
Dashboard /wp-admin2.11 ▼1.197.74 ▼40.34
Posts /wp-admin/edit.php2.11 ▼1.246.18 ▼39.88
Add New Post /wp-admin/post-new.php2.11 ▼3.779.36 ▼90.83
Media Library /wp-admin/upload.php2.11 ▼1.125.87 ▼23.96
TCPDF Wrapper /wp-admin/options-general.php?page=tcpdf-wrapper-options2.116.58

Server storage [IO: ▲28.43MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Filesystem usage must be lower than 25MB (currently using 28.43MB)
Filesystem: 237 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for DoublewP TCPDF Wrapper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.18 ▼1.411.76 ▼0.0445.22 ▼1.19
Dashboard /wp-admin2,207 ▲195.79 ▲0.9299.41 ▼6.3739.09 ▼0.44
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0035.31 ▼8.2833.70 ▼1.80
Add New Post /wp-admin/post-new.php1,517 ▼1617.75 ▼5.37599.93 ▼94.1556.93 ▲5.02
Media Library /wp-admin/upload.php1,389 ▲74.22 ▲0.0395.14 ▼2.6643.51 ▲0.21
TCPDF Wrapper /wp-admin/options-general.php?page=tcpdf-wrapper-options8062.0425.4525.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/doublewp-tcpdf-wrapper/includes/class-tcpdf-wrapper.php+102
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tcpdf-wrapper-options
    • > Notice in wp-content/plugins/doublewp-tcpdf-wrapper/includes/class-tcpdf-wrapper.php+102
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/doublewp-tcpdf-wrapper/lib/tcpdf/tools/tcpdf_addfont.php

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

doublewp-tcpdf-wrapper/tcpdf-wrapper.php 85% from 13 tests

The main file in "DoublewP TCPDF Wrapper" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("doublewp-tcpdf-wrapper.php" instead of "tcpdf-wrapper.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin47,537 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP1011,55212,03647,357
Markdown232084
PO File1121349
JSON10047

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,379)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity340.16
▷ Minimum class complexity1.00
▷ Maximum class complexity4,379.00
Average method complexity9.86
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods727
▷ Static methods11015.13%
▷ Public methods44661.35%
▷ Protected methods27637.96%
▷ Private methods50.69%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants108
▷ Global constants108100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png28.16KB11.14KB▼ 60.45%