89% beanstream-gateway-for-woocommerce

Code Review | Beanstream for WooCommerce

WordPress plugin Beanstream for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: beanstream-gatewa...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: vkuberan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.11ms] Passed 4 tests

Analyzing server-side resources used by Beanstream for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.93 ▲4.62
Dashboard /wp-admin3.34 ▲0.0356.36 ▲3.06
Posts /wp-admin/edit.php3.39 ▲0.0349.90 ▼2.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.31 ▼8.93
Media Library /wp-admin/upload.php3.26 ▲0.0339.37 ▲4.23

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Beanstream for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.021.71 ▼0.2544.13 ▲2.24
Dashboard /wp-admin2,192 ▲125.57 ▼0.0584.31 ▼3.9238.78 ▼0.79
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0539.00 ▼2.3535.19 ▼3.24
Add New Post /wp-admin/post-new.php1,526 ▼223.12 ▲0.03741.49 ▲31.6565.33 ▲7.05
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.00112.52 ▲6.7147.90 ▲3.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The standard credit card form on the checkout page.), #2 (Beanstream admin settings)
The official readme.txt might help

beanstream-gateway-for-woocommerce/beanstream-for-woocommerce.php 92% from 13 tests

"Beanstream for WooCommerce" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("beanstream-gateway-for-woocommerce.php" instead of "beanstream-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin443 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4119249424
Markdown15011
CSS1208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.00
▷ Minimum class complexity9.00
▷ Maximum class complexity39.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods416.00%
▷ Public methods1872.00%
▷ Protected methods624.00%
▷ Private methods14.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png53.28KB26.12KB▼ 50.97%
assets/images/credits.png6.19KB3.36KB▼ 45.68%
screenshot-1.png43.51KB16.81KB▼ 61.36%