90% embed-pdf-wpforms

Code Review | Embed PDF for WPForms

WordPress plugin Embed PDF for WPForms scored90%from 54 tests.

About plugin

  • Plugin page: embed-pdf-wpforms
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2023
  • Latest release: Nov 25, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: salzano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /11 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Embed PDF for WPForms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.30 ▼0.68
Dashboard /wp-admin3.31 ▼0.0345.39 ▼14.94
Posts /wp-admin/edit.php3.36 ▲0.0151.81 ▲7.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.24 ▼1.23
Media Library /wp-admin/upload.php3.23 ▲0.0133.48 ▲2.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Embed PDF for WPForms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.67 ▲0.601.54 ▼0.3836.43 ▼0.50
Dashboard /wp-admin2,195 ▲155.60 ▲0.0993.04 ▼8.0441.84 ▼1.26
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0440.20 ▼4.2133.56 ▼4.38
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.07616.63 ▲17.6354.80 ▼13.40
Media Library /wp-admin/upload.php1,394 ▼04.16 ▼0.0597.34 ▼6.9841.57 ▼1.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: Please take inspiration from this readme.txt

embed-pdf-wpforms/embed-pdf-wpforms.php Passed 13 tests

The primary PHP file in "Embed PDF for WPForms" version 1.1.1 is used by WordPress to initiate all plugin functionality
48 characters long description:
Add-on for WPForms. Provides a PDF Viewer field.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,570 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON200798
PHP270205387
JavaScript652127335
CSS441146
Markdown1204

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ 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