83% cardlesspay-by-cardless-paytech

Code Review | CardlessPay by Cardless Payment Processing

WordPress plugin CardlessPay by Cardless Payment Processing scored83%from 54 tests.

About plugin

  • Plugin page: cardlesspay-by-ca...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Nov 14, 2019
  • Latest release: Jul 15, 2020
  • Number of updates: 15
  • Update frequency: every 16.4 days
  • Top authors: cardlesspaytech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼13.09ms] Passed 4 tests

A check of server-side resources used by CardlessPay by Cardless Payment Processing
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.88 ▼2.01
Dashboard /wp-admin3.54 ▲0.2436.68 ▼14.45
Posts /wp-admin/edit.php3.61 ▲0.2537.16 ▼7.99
Add New Post /wp-admin/post-new.php5.79 ▼0.1073.77 ▼24.47
Media Library /wp-admin/upload.php3.55 ▲0.3232.41 ▼5.46

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
recovery_mode_email_last_sent
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by CardlessPay by Cardless Payment Processing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,478 ▼1,28312.44 ▼1.731.77 ▲0.1739.85 ▲0.39
Dashboard /wp-admin871 ▼1,3101.40 ▼4.3315.56 ▼95.5919.13 ▼21.67
Posts /wp-admin/edit.php882 ▼1,2181.54 ▼0.487.72 ▼30.9319.66 ▼13.65
Add New Post /wp-admin/post-new.php605 ▼9211.75 ▼21.3126.05 ▼587.356.68 ▼83.36
Media Library /wp-admin/upload.php767 ▼6331.75 ▼2.4723.07 ▼82.6420.36 ▼28.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cardlesspay-by-cardless-paytech/includes/cardless_extra_functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cardlesspay-by-cardless-paytech/includes/cardless_settings.php:240

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

cardlesspay-by-cardless-paytech/woocommerce-gateway-cardless-money.php 85% from 13 tests

Analyzing the main PHP file in "CardlessPay by Cardless Payment Processing" version 1.0.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cardlesspay-by-cardless-paytech.php" instead of "woocommerce-gateway-cardless-money.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.1" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,150 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42172991,054
JavaScript19096

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity22.50
▷ Minimum class complexity9.00
▷ Maximum class complexity36.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods517.86%
▷ Public methods2382.14%
▷ Protected methods13.57%
▷ Private methods414.29%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin