90% wc-bacs-paybysquare

Code Review | PAY by square pre WooCommerce

WordPress plugin PAY by square pre WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: wc-bacs-paybysquare
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2017
  • Latest release: Jul 12, 2021
  • Number of updates: 18
  • Update frequency: every 74.9 days
  • Top authors: kravco (61.11%)webikon (27.78%)ishyoboy (22.22%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 5,165 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼4.08ms] Passed 4 tests

An overview of server-side resources used by PAY by square pre WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.90 ▼6.61
Dashboard /wp-admin3.32 ▲0.0242.58 ▼7.91
Posts /wp-admin/edit.php3.37 ▲0.0145.66 ▲1.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.91 ▲1.73
Media Library /wp-admin/upload.php3.24 ▲0.0132.86 ▼3.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PAY by square pre WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.091.93 ▲0.2335.73 ▼9.18
Dashboard /wp-admin2,206 ▲154.82 ▼0.08110.35 ▼7.2740.16 ▼5.48
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0140.84 ▲4.8133.64 ▲0.50
Add New Post /wp-admin/post-new.php1,528 ▲923.42 ▲0.31686.88 ▼5.7364.42 ▲9.02
Media Library /wp-admin/upload.php1,388 ▲34.29 ▲0.0896.53 ▼8.9842.10 ▼3.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: bacs, slovakia, qrcode

wc-bacs-paybysquare/wc-bacs-paybysquare.php 92% from 13 tests

The main PHP file in "PAY by square pre WooCommerce" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "3.0")

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
There were no executable files found in this plugin442 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24021363
PO File1232379

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods1173.33%
▷ Protected methods426.67%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected