84% bvd-wcpdf-user-template

Code Review | WCPDF User Template

WordPress plugin WCPDF User Template scored84%from 54 tests.

About plugin

  • Plugin page: bvd-wcpdf-user-te...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2020
  • Latest release: Jul 18, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: basvandijkk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /348 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.32ms] Passed 4 tests

Server-side resources used by WCPDF User Template
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.22 ▼2.80
Dashboard /wp-admin3.34 ▲0.0352.05 ▼1.90
Posts /wp-admin/edit.php3.45 ▲0.0946.92 ▼0.80
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.25 ▼15.76
Media Library /wp-admin/upload.php3.26 ▲0.0335.98 ▲1.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WCPDF User Template
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.17 ▼1.211.80 ▲0.0542.78 ▲2.56
Dashboard /wp-admin2,240 ▲374.86 ▼0.98105.19 ▼5.0942.50 ▲0.12
Posts /wp-admin/edit.php2,113 ▲132.00 ▼0.1635.15 ▼4.4133.22 ▼5.03
Add New Post /wp-admin/post-new.php1,540 ▲923.24 ▼0.04681.76 ▼3.2457.79 ▲3.43
Media Library /wp-admin/upload.php1,416 ▲164.22 ▲0.04111.49 ▲12.5548.19 ▲6.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • bvd_wcpdf_user_template_settings
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'BvdWcpdfUserTemplateAbstract' not found in wp-content/plugins/bvd-wcpdf-user-template/general/classes/Templates.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BvdWcpdfUserTemplateAbstract' not found in wp-content/plugins/bvd-wcpdf-user-template/general/classes/TemplatePath.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BvdWcpdfUserTemplateAbstract' not found in wp-content/plugins/bvd-wcpdf-user-template/admin/classes/SettingPage.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BvdWcpdfUserTemplateAbstract' not found in wp-content/plugins/bvd-wcpdf-user-template/admin/classes/User.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BvdWcpdfUserTemplateAbstract' not found in wp-content/plugins/bvd-wcpdf-user-template/general/classes/User.class.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: woocommerce-pdf-invoices-packing-slips, user based template

bvd-wcpdf-user-template/bvd-wcpdf-user-template.php 92% from 13 tests

Analyzing the main PHP file in "WCPDF User Template" version 1.0.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected745 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP25225698707
Sass12016
CSS12012
JSON2207
JavaScript12273

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.94
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods63
▷ Static methods812.70%
▷ Public methods5688.89%
▷ Protected methods00.00%
▷ Private methods711.11%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin