84% swipe-for-woocommerce

Code Review | Swipe for WooCommerce

WordPress plugin Swipe for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: swipe-for-woocomm...
  • 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: May 17, 2022
  • Latest release: Sep 23, 2022
  • Number of updates: 10
  • Update frequency: every 16.4 days
  • Top authors: teamswipe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 309 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲3.31ms] Passed 4 tests

Analyzing server-side resources used by Swipe for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2745.02 ▲3.42
Dashboard /wp-admin3.58 ▲0.2747.72 ▲0.85
Posts /wp-admin/edit.php3.63 ▲0.2748.12 ▲2.52
Add New Post /wp-admin/post-new.php6.11 ▲0.2296.97 ▲8.09
Media Library /wp-admin/upload.php3.44 ▲0.2041.37 ▲6.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Swipe for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.28 ▼1.124.20 ▲2.3141.97 ▲0.41
Dashboard /wp-admin2,242 ▲544.93 ▼0.97112.88 ▲1.5982.45 ▲42.74
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0636.22 ▼1.7935.56 ▲3.40
Add New Post /wp-admin/post-new.php1,700 ▲18622.57 ▲4.98706.88 ▲110.7452.20 ▲0.18
Media Library /wp-admin/upload.php1,418 ▲274.23 ▲0.0197.80 ▲2.7276.47 ▲33.54

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/psr/http-client/src/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/guzzle/src/Pool.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/swipe-for-woocommerce/libraries/swipego/vendor/guzzlehttp/psr7/src/Stream.php:12

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

swipe-for-woocommerce/swipego-wc.php 92% from 13 tests

The entry point to "Swipe for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("swipe-for-woocommerce.php" instead of "swipego-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected17,265 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1352,4385,76010,007
Markdown171,24403,658
JavaScript56051732,412
JSON13001,051
CSS50076
SVG50145
make1409
YAML1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.22
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes87
▷ Abstract classes11.15%
▷ Concrete classes8698.85%
▷ Final classes3439.53%
Methods810
▷ Static methods13917.16%
▷ Public methods67483.21%
▷ Protected methods101.23%
▷ Private methods12615.56%
Functions134
▷ Named functions4533.58%
▷ Anonymous functions8966.42%
Constants74
▷ Global constants912.16%
▷ Class constants6587.84%
▷ Public constants5483.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin