67% cashtippr-woocommerce-addon

Code Review | CashTippr Woocommerce Addon

WordPress plugin CashTippr Woocommerce Addon scored67%from 54 tests.

About plugin

  • Plugin page: cashtippr-woocomm...
  • Plugin version: 1.1.16
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Dec 10, 2020
  • Number of updates: 45
  • Update frequency: every 13.8 days
  • Top authors: ekliptor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,146 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.64ms] Passed 4 tests

An overview of server-side resources used by CashTippr Woocommerce Addon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.60 ▲0.26
Dashboard /wp-admin3.33 ▲0.0246.60 ▼4.80
Posts /wp-admin/edit.php3.38 ▲0.0245.16 ▲0.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.39 ▼10.88
Media Library /wp-admin/upload.php3.25 ▲0.0236.09 ▲1.83

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CashTippr Woocommerce Addon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5314.44 ▲0.061.71 ▼0.3244.47 ▼0.88
Dashboard /wp-admin2,213 ▲255.84 ▲0.94104.52 ▼9.1241.64 ▼7.29
Posts /wp-admin/edit.php2,098 ▲92.01 ▼0.0135.72 ▼0.8133.88 ▼1.91
Add New Post /wp-admin/post-new.php1,548 ▲1323.33 ▲0.12651.30 ▼17.3154.58 ▼2.91
Media Library /wp-admin/upload.php1,392 ▲104.21 ▲0.0097.59 ▼0.8843.52 ▼5.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Ekliptor\Cashtippr\Woocommerce' not found
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/cashtippr-woocommerce-addon/cashtippr-woocommerce.php
    • > /wp-content/plugins/cashtippr-woocommerce-addon/tpl/paymentControls.php
    • > /wp-content/plugins/cashtippr-woocommerce-addon/tpl/email/invoice.php
    • > /wp-content/plugins/cashtippr-woocommerce-addon/tpl/client/payManualAddress.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CTIP_TemplateEngine' not found in wp-content/plugins/cashtippr-woocommerce-addon/classes/WoocommerceTemplateEngine.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/cashtippr-woocommerce-addon/classes/Woocommerce.php:10
    • > PHP Warning
      include(CTIP_WOOCOMMERCE__PLUGIN_DIRclasses/WoocommerceApi.php): failed to open stream: No such file or directory in wp-content/plugins/cashtippr-woocommerce-addon/classes/Woocommerce.php on line 7
    • > PHP Warning
      include(): Failed opening 'CTIP_WOOCOMMERCE__PLUGIN_DIRclasses/WoocommerceApi.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cashtippr-woocommerce-addon/classes/Woocommerce.php on line 7
    • > PHP Warning
      Use of undefined constant CTIP_WOOCOMMERCE__PLUGIN_DIR - assumed 'CTIP_WOOCOMMERCE__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cashtippr-woocommerce-addon/classes/Woocommerce.php on line 7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

cashtippr-woocommerce-addon/cashtippr-woocommerce.php 77% from 13 tests

The main PHP script in "CashTippr Woocommerce Addon" version 1.1.16 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cashtippr-woocommerce-addon.php" instead of "cashtippr-woocommerce.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7" instead of "3.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected922 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12141217903
Markdown110019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.14
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods53
▷ Static methods916.98%
▷ Public methods4584.91%
▷ Protected methods611.32%
▷ Private methods23.77%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.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