89% embed-pdf-gravityforms

Code Review | Embed PDF for Gravity Forms

WordPress plugin Embed PDF for Gravity Forms scored89%from 54 tests.

About plugin

  • Plugin page: embed-pdf-gravity...
  • 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: Sep 14, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 7
  • Update frequency: every 10.9 days
  • Top authors: salzano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /295 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.01MB] [CPU: ▼12.20ms] Passed 4 tests

An overview of server-side resources used by Embed PDF for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.77 ▼7.03
Dashboard /wp-admin3.31 ▼0.0447.22 ▼18.11
Posts /wp-admin/edit.php3.36 ▲0.0048.44 ▲2.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.43 ▼20.59
Media Library /wp-admin/upload.php3.23 ▲0.0035.57 ▼3.08

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Embed PDF for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.72 ▲0.381.88 ▲0.0536.97 ▼6.36
Dashboard /wp-admin2,195 ▲175.60 ▼0.0597.87 ▼18.0943.67 ▼2.27
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0440.37 ▲1.6237.14 ▼0.39
Add New Post /wp-admin/post-new.php1,526 ▼1223.12 ▼0.30582.84 ▼75.8956.55 ▲4.20
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0596.87 ▲1.7442.74 ▼0.39

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed: Please take inspiration from this readme.txt

embed-pdf-gravityforms/embed-pdf-gravityforms.php 92% from 13 tests

"Embed PDF for Gravity Forms" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,551 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JSON200798
JavaScript652152354
PHP463252343
CSS451351
Markdown1205

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.50
▷ Minimum class complexity11.00
▷ Maximum class complexity14.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin