83% gf-borgun-add-on

Code Review | Gravity Forms Borgun Add-On

WordPress plugin Gravity Forms Borgun Add-On scored83%from 54 tests.

About plugin

  • Plugin page: gf-borgun-add-on
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 10, 2018
  • Latest release: Mar 10, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: marifamir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /621 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.17ms] Passed 4 tests

Analyzing server-side resources used by Gravity Forms Borgun Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.74 ▲1.59
Dashboard /wp-admin3.31 ▲0.0145.36 ▼1.59
Posts /wp-admin/edit.php3.37 ▲0.0148.53 ▲3.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.29 ▲11.06
Media Library /wp-admin/upload.php3.24 ▲0.0133.96 ▼2.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Borgun Add-On
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.202.00 ▲0.2945.28 ▲1.73
Dashboard /wp-admin2,206 ▲655.91 ▲0.24106.14 ▲2.8242.12 ▲5.65
Posts /wp-admin/edit.php2,092 ▼02.05 ▼0.0141.68 ▲8.0134.78 ▲0.84
Add New Post /wp-admin/post-new.php1,521 ▼1223.12 ▼0.03603.21 ▼94.4852.43 ▲4.34
Media Library /wp-admin/upload.php1,391 ▲34.25 ▼0.0199.02 ▼10.5540.69 ▼3.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-borgun-add-on/class-gf-borgun.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-borgun-add-on/borgun.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The settings panel for the Borgun gateway), #2 (Form and Feed screen), #3 (Payment screen), #4 (Entry screen), #5 (Sales Page)
You can look at the official readme.txt

gf-borgun-add-on/borgun.php 85% from 13 tests

The principal PHP file in "Gravity Forms Borgun Add-On" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gf-borgun-add-on.php" instead of "borgun.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,105 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22741301,016
JavaScript2231289

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.33
Average class complexity68.00
▷ Minimum class complexity2.00
▷ Maximum class complexity134.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods56
▷ Static methods712.50%
▷ Public methods5394.64%
▷ Protected methods00.00%
▷ Private methods35.36%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tooltip_tip.png0.24KB0.28KB0.00%
images/tick.png0.52KB0.52KB0.00%
images/add.png3.37KB0.66KB▼ 80.54%
images/active0.png0.65KB0.61KB▼ 5.56%
images/remove.png3.32KB0.62KB▼ 81.33%