90% weforms-pdf

Code Review | weForms PDF

WordPress plugin weForms PDF scored90%from 54 tests.

About plugin

  • Plugin page: weforms-pdf
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.6
  • WordPress version: 6.3.1
  • First release: May 17, 2018
  • Latest release: May 18, 2018
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: mishuk24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.05ms] Passed 4 tests

Analyzing server-side resources used by weForms PDF
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0050.93 ▲3.95
Dashboard /wp-admin3.31 ▲0.0049.36 ▲2.06
Posts /wp-admin/edit.php3.36 ▲0.0052.81 ▼0.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.43 ▼13.91
Media Library /wp-admin/upload.php3.23 ▲0.0035.37 ▲0.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by weForms PDF
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.70 ▼1.061.56 ▼0.4941.13 ▼8.36
Dashboard /wp-admin2,206 ▲155.91 ▲1.08100.09 ▼12.1039.70 ▼0.43
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0237.04 ▼4.1335.18 ▼2.90
Add New Post /wp-admin/post-new.php1,533 ▼123.37 ▲0.21647.04 ▼54.4857.86 ▲7.07
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0398.85 ▼12.7044.82 ▼0.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

weforms-pdf/weforms-pdf.php Passed 13 tests

The entry point to "weForms PDF" version 1.0.0 is a PHP file that has certain tags in its header comment area
59 characters long description:
A simple plugin which allow to download weforms data as pdf

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
Everything looks great! No dangerous files found in this plugin3,309 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP192502923,044
HTML1280244
CSS10021

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity145.67
▷ Minimum class complexity8.00
▷ Maximum class complexity338.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods128
▷ Static methods10.78%
▷ Public methods9070.31%
▷ Protected methods3829.69%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected