84% qualpay-payment-for-gravity-forms

Code Review | Qualpay Add-on for Gravity Forms

WordPress plugin Qualpay Add-on for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: qualpay-payment-f...
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2021
  • Latest release: Aug 10, 2022
  • Number of updates: 12
  • Update frequency: every 33.7 days
  • Top authors: qualpayjankee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.03ms] Passed 4 tests

Analyzing server-side resources used by Qualpay Add-on for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.91 ▲0.74
Dashboard /wp-admin3.33 ▲0.0246.07 ▼4.46
Posts /wp-admin/edit.php3.38 ▲0.0248.47 ▼1.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.93 ▼22.62
Media Library /wp-admin/upload.php3.25 ▲0.0236.20 ▲1.36

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Qualpay Add-on for Gravity Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.391.71 ▼0.0742.81 ▲1.77
Dashboard /wp-admin2,206 ▲215.88 ▲0.77107.46 ▲3.4437.55 ▼6.06
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0543.48 ▲7.5335.44 ▼0.62
Add New Post /wp-admin/post-new.php1,536 ▲2323.30 ▲5.84648.47 ▼37.9355.77 ▲4.63
Media Library /wp-admin/upload.php1,385 ▼64.24 ▲0.0391.85 ▼21.5940.34 ▼5.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/qualpay-payment-for-gravity-forms/includes/api/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/qualpay-payment-for-gravity-forms/includes/api/Psr/Log/NullLogger.php:13

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gravity, subscription, credit cards, recurring, payment

qualpay-payment-for-gravity-forms/gravityformsqualpay.php 85% from 13 tests

Analyzing the main PHP file in "Qualpay Add-on for Gravity Forms" version 1.3.2
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("qualpay-payment-for-gravity-forms.php" instead of "gravityformsqualpay.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,583 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP262,0223,3325,457
JavaScript48367126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.56
▷ Minimum class complexity1.00
▷ Maximum class complexity365.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces2
Traits2
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods177
▷ Static methods1810.17%
▷ Public methods15889.27%
▷ Protected methods00.00%
▷ Private methods1910.73%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants833.33%
▷ Class constants1666.67%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/qualpay-icon-white.png68.65KB46.23KB▼ 32.66%