84% swipe-for-gravity-forms

Code Review | Swipe for Gravity Forms

WordPress plugin Swipe for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: swipe-for-gravity...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2022
  • Latest release: Mar 28, 2023
  • Number of updates: 25
  • Update frequency: every 11.7 days
  • Top authors: teamswipe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /281 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.23MB] [CPU: ▼3.70ms] Passed 4 tests

This is a short check of server-side resources used by Swipe for Gravity Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2739.46 ▼3.84
Dashboard /wp-admin3.58 ▲0.2351.10 ▼11.53
Posts /wp-admin/edit.php3.63 ▲0.2749.50 ▲4.59
Add New Post /wp-admin/post-new.php6.12 ▲0.2394.42 ▼1.63
Media Library /wp-admin/upload.php3.44 ▲0.2138.42 ▲2.19

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Swipe for Gravity Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.59 ▼0.761.62 ▼0.1440.41 ▼1.36
Dashboard /wp-admin2,242 ▲545.83 ▲0.9598.41 ▼4.9766.81 ▲22.67
Posts /wp-admin/edit.php2,121 ▲322.00 ▲0.0439.17 ▲3.9636.48 ▼0.25
Add New Post /wp-admin/post-new.php1,556 ▲4218.21 ▲0.72666.97 ▼39.2664.41 ▲8.47
Media Library /wp-admin/upload.php1,412 ▲244.22 ▲0.0098.78 ▼3.6679.71 ▲33.30

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/swipe-for-gravity-forms/admin/views/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/admin/views/dashboard.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/promises/src/AggregateException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/promises/src/Coroutine.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/psr/http-client/src/RequestExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/swipe-for-gravity-forms/libraries/swipego/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

swipe-for-gravity-forms/swipego-gf.php 92% from 13 tests

This is the main PHP file of "Swipe for Gravity Forms" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("swipe-for-gravity-forms.php" instead of "swipego-gf.php")

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
Good job! No executable or dangerous file extensions detected17,085 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
PHP1352,4585,77110,090
Markdown171,23003,613
JavaScript55681642,197
JSON13001,051
CSS40073
SVG50145
make1409
YAML1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.29
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes87
▷ Abstract classes11.15%
▷ Concrete classes8698.85%
▷ Final classes3439.53%
Methods817
▷ Static methods14017.14%
▷ Public methods68683.97%
▷ Protected methods101.22%
▷ Private methods12114.81%
Functions134
▷ Named functions4432.84%
▷ Anonymous functions9067.16%
Constants74
▷ Global constants912.16%
▷ Class constants6587.84%
▷ Public constants5483.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin