10% swipe-for-givewp

Code Review | SwipeGo for GiveWP

WordPress plugin SwipeGo for GiveWP scored10%from 54 tests.

About plugin

  • Plugin page: swipe-for-givewp
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2022
  • Latest release: Oct 3, 2022
  • Number of updates: 4
  • Update frequency: every 20.0 days
  • Top authors: teamswipe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /156 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.97ms] Passed 4 tests

Server-side resources used by SwipeGo for GiveWP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.65 ▼38.06
Dashboard /wp-admin2.05 ▼1.266.87 ▼38.42
Posts /wp-admin/edit.php2.05 ▼1.316.36 ▼36.01
Add New Post /wp-admin/post-new.php2.05 ▼3.846.64 ▼87.38
Media Library /wp-admin/upload.php2.05 ▼1.187.28 ▼27.12

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 207 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

SwipeGo for GiveWP: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲12313.29 ▼1.091.92 ▼0.4242.11 ▼3.62
Dashboard /wp-admin2,242 ▲575.82 ▲0.0199.23 ▼2.6165.57 ▲23.95
Posts /wp-admin/edit.php2,118 ▲291.99 ▲0.0034.91 ▼2.7332.57 ▼2.84
Add New Post /wp-admin/post-new.php1,547 ▲2823.22 ▼0.04760.87 ▲72.2760.14 ▼1.43
Media Library /wp-admin/upload.php1,415 ▲274.14 ▼0.14108.89 ▲2.9181.93 ▲38.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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)
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
The following issues need your attention
  • 52× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/psr7/src/FnStream.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\BodySummarizerInterface' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/guzzle/src/BodySummarizer.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/swipe-for-givewp/libraries/swipego/admin/views/dashboard.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/promises/src/AggregateException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/swipe-for-givewp/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8

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)
No browser issues were found

Optimizations

Plugin configuration 90% 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
Please fix the following attributes: The official readme.txt is a good inspiration

swipe-for-givewp/swipego-gwp.php 85% from 13 tests

The main file in "SwipeGo for GiveWP" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("swipe-for-givewp.php" instead of "swipego-gwp.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.2" instead of "4.6")

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
Success! There were no dangerous files found in this plugin17,402 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1362,4325,82010,313
Markdown171,22803,601
JavaScript55981632,303
JSON13001,051
CSS40073
SVG50145
make1409
YAML1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.38
▷ 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
Classes88
▷ Abstract classes11.14%
▷ Concrete classes8798.86%
▷ Final classes3439.08%
Methods829
▷ Static methods14317.25%
▷ Public methods69583.84%
▷ Protected methods111.33%
▷ Private methods12314.84%
Functions136
▷ Named functions4533.09%
▷ Anonymous functions9166.91%
Constants77
▷ Global constants911.69%
▷ Class constants6888.31%
▷ Public constants5783.82%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin