94% woocommerce-phone-payments

Code Review | WooCommerce Phone Payments

WordPress plugin WooCommerce Phone Payments scored 94% from 54 tests.

About plugin

  • Plugin page: woocommerce-phone...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Dec 9, 2014
  • Latest release: Dec 9, 2014
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: matthew.james.allan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,132 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼151.33ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Phone Payments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0139.68 ▼7.59
Dashboard /wp-admin3.07 ▲0.0153.41 ▼37.96
Posts /wp-admin/edit.php3.12 ▲0.0152.48 ▼13.05
Add New Post /wp-admin/post-new.php5.43 ▲0.00111.16 ▼546.70
Media Library /wp-admin/upload.php3.01 ▲0.0042.69 ▼6.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Phone Payments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲7115.94 ▲0.0412.37 ▼3.0248.91 ▼15.36
Dashboard /wp-admin2,975 ▲436.14 ▲0.24150.02 ▼49.37119.11 ▼23.08
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0274.76 ▼5.3293.49 ▼15.12
Add New Post /wp-admin/post-new.php1,620 ▼6321.05 ▲4.34337.21 ▼119.83112.65 ▼13.15
Media Library /wp-admin/upload.php1,812 ▲55.07 ▲0.05176.43 ▲5.45129.69 ▼10.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller 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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-phone-payments/woocommerce-phone-payments.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

woocommerce-phone-payments/woocommerce-phone-payments.php Passed 13 tests

The main PHP file in "WooCommerce Phone Payments" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
83 characters long description:
Adds the ability to add payments to Woocommerce orders from the order admin screen.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected598 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript298100436
JSON310102
PHP1161833
Markdown111027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin