84% manual-credit-card-processing-for-woocommerce

Code Review | Manual Credit Card Processing for WooCommerce

WordPress plugin Manual Credit Card Processing for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: manual-credit-car...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.8
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Jun 27, 2018
  • Number of updates: 25
  • Update frequency: every 27.5 days
  • Top authors: VolcomMky (84%)woodev (20%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,452 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.93MB] [CPU: ▼29.82ms] Passed 4 tests

Analyzing server-side resources used by Manual Credit Card Processing for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.37 ▲0.25
Dashboard /wp-admin3.33 ▲0.0348.63 ▼4.86
Posts /wp-admin/edit.php3.38 ▲0.0347.97 ▼5.42
Add New Post /wp-admin/post-new.php2.10 ▼3.795.64 ▼108.82
Media Library /wp-admin/upload.php3.25 ▲0.0337.17 ▼0.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Manual Credit Card Processing for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.201.80 ▲0.0238.37 ▼7.40
Dashboard /wp-admin2,198 ▲215.62 ▲0.0487.53 ▼14.2140.81 ▼4.33
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0235.02 ▼3.5134.37 ▲0.09
Add New Post /wp-admin/post-new.php1,528 ▼023.21 ▼0.04661.60 ▼32.4349.68 ▼17.47
Media Library /wp-admin/upload.php1,394 ▼64.12 ▼0.1999.81 ▼20.1644.54 ▼5.03

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/manual-credit-card-processing-for-woocommerce/assets/styles.php
    • > /wp-content/plugins/manual-credit-card-processing-for-woocommerce/moco-woocommerce-manual-cc-processing.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: manual, credit card, orders, phone, offline...

manual-credit-card-processing-for-woocommerce/moco-woocommerce-manual-cc-processing.php 85% from 13 tests

Analyzing the main PHP file in "Manual Credit Card Processing for WooCommerce" version 1.6.1
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 293 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("manual-credit-card-processing-for-woocommerce.php" instead of "moco-woocommerce-manual-cc-processing.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,213 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5121186798
JavaScript1377415

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.39
Average class complexity25.00
▷ Minimum class complexity6.00
▷ Maximum class complexity51.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods30
▷ Static methods1240.00%
▷ Public methods2686.67%
▷ Protected methods00.00%
▷ Private methods413.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected