83% gpdf-form

Code Review | GPDF From

WordPress plugin GPDF From scored83%from 54 tests.

About plugin

  • Plugin page: gpdf-form
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Sep 4, 2019
  • Latest release: Sep 5, 2019
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: opcodespace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by GPDF From
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.42 ▼14.32
Dashboard /wp-admin3.31 ▲0.0050.65 ▲2.38
Posts /wp-admin/edit.php3.36 ▲0.0047.35 ▼5.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.19 ▼10.75
Media Library /wp-admin/upload.php3.23 ▲0.0038.71 ▲3.09

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by GPDF From
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.141.85 ▼0.1538.82 ▼5.02
Dashboard /wp-admin2,206 ▲215.85 ▼0.06100.09 ▼6.2643.78 ▲1.58
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0438.76 ▼3.9531.02 ▼3.39
Add New Post /wp-admin/post-new.php1,538 ▲1423.15 ▼0.33686.22 ▼2.2566.52 ▲11.43
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0693.95 ▼13.5941.68 ▼2.72

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'LpfAbstractModule' not found in wp-content/plugins/gpdf-form/assets/src/class-LpfFieldsAssociation.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LpfAbstractModule' not found in wp-content/plugins/gpdf-form/src/class-LpfGeneratedPdf.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gpdf-form/src/class-LpfGfaddon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'LpfAbstractModule' not found in wp-content/plugins/gpdf-form/assets/src/class-LpfGeneratedPdf.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gpdf-form/assets/src/class-LpfGfaddon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'LpfAbstractModule' not found in wp-content/plugins/gpdf-form/src/class-LpfFieldsAssociation.php:5

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • License uri: Please fix this invalid URI: ""
  • Screenshots: Please add an image for screenshot #6 (/assets/screenshot-6.png)
You can take inspiration from this readme.txt

gpdf-form/app.php 85% from 13 tests

Analyzing the main PHP file in "GPDF From" version 0.1
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gpdf-form.php" instead of "app.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected4,525 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS518202,193
PHP183063831,431
SVG200853
JavaScript5121348

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.54
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes00.00%
Methods103
▷ Static methods1413.59%
▷ Public methods103100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/add-on/chosen/chosen-sprite.png0.63KB0.88KB0.00%
assets/assets/add-on/chosen/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
assets/add-on/chosen/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
assets/assets/add-on/chosen/chosen-sprite.png0.63KB0.88KB0.00%