93% wootastic-beanstream

Code Review | Wootastic Beanstream

WordPress plugin Wootastic Beanstream scored 93% from 54 tests.

About plugin

  • Plugin page: wootastic-beanstream
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.3
  • WordPress version: 5.8.1
  • First release: Mar 18, 2017
  • Latest release: Mar 22, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: calvincanas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 299 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Wootastic Beanstream
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1537.61 ▲13.42
Dashboard /wp-admin3.09 ▲0.0346.29 ▼5.53
Posts /wp-admin/edit.php3.14 ▲0.0344.34 ▼5.59
Add New Post /wp-admin/post-new.php5.45 ▲0.0186.69 ▼577.00
Media Library /wp-admin/upload.php3.03 ▲0.0335.90 ▲0.53

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Wootastic Beanstream
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.34 ▲0.3010.63 ▲2.6755.23 ▲3.28
Dashboard /wp-admin2,967 ▲335.93 ▼0.16159.39 ▲0.69114.22 ▼16.48
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0068.06 ▼3.3990.78 ▼4.17
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.02393.99 ▲4.00115.60 ▲1.24
Media Library /wp-admin/upload.php1,810 ▲35.01 ▲0.00155.41 ▼3.08129.13 ▼0.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wootastic-beanstream/vendor/inacho/php-credit-card-validator/tests/Test.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mcrypt_create_iv() in wp-content/plugins/wootastic-beanstream/vendor/beanstream/beanstream/src/Beanstream/examples.php:15

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 errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: beanstream, payment gateway, woocommerce

wootastic-beanstream/wooco_beanstream.php 69% from 13 tests

The primary PHP file in "Wootastic Beanstream" version 0.1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("wootastic-beanstream.php" instead of "wooco_beanstream.php")
  • Git Repository: An alternative Git repository was detected
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,634 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP215041,0511,332
Markdown2570159
JSON300143

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.82
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods106
▷ Static methods1312.26%
▷ Public methods9791.51%
▷ Protected methods76.60%
▷ Private methods21.89%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

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