84% depositslk-woocommerce

Code Review | Deposits.lk - Woocommerce | Automating Your Bank Deposit Slips

WordPress plugin Deposits.lk - Woocommerce | Automating Your Bank Deposit Slips scored 84% from 54 tests.

About plugin

  • Plugin page: depositslk-woocom...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 11, 2020
  • Latest release: Aug 11, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: depositslk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Deposits.lk - Woocommerce | Automating Your Bank Deposit Slips
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.02 ▼12.45
Dashboard /wp-admin3.31 ▲0.0143.81 ▼11.03
Posts /wp-admin/edit.php3.36 ▲0.0147.02 ▲2.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.00 ▲6.71
Media Library /wp-admin/upload.php3.24 ▲0.0137.12 ▲2.77

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

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

Browser metrics Passed 4 tests

Deposits.lk - Woocommerce | Automating Your Bank Deposit Slips: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.25 ▼1.121.64 ▼0.2443.41 ▼5.50
Dashboard /wp-admin2,208 ▲234.87 ▼0.94107.21 ▼3.0038.94 ▼4.38
Posts /wp-admin/edit.php2,088 ▼12.05 ▲0.0639.43 ▲1.5633.96 ▼3.56
Add New Post /wp-admin/post-new.php1,530 ▼323.02 ▼0.17595.26 ▼7.6150.05 ▼6.97
Media Library /wp-admin/upload.php1,384 ▲24.21 ▲0.0397.91 ▼3.9840.07 ▼2.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/depositslk-woocommerce/depositslk-woocommerce-payment-gateway.php:11
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/depositslk-woocommerce/depositslk-woocommerce-payment-gateway.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: online, sri lanka, depositslk, payments

depositslk-woocommerce/depositslk-woocommerce-payment-gateway.php 92% from 13 tests

The main PHP script in "Deposits.lk - Woocommerce | Automating Your Bank Deposit Slips" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("depositslk-woocommerce.php" instead of "depositslk-woocommerce-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected257 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16221249
CSS1208

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png10.53KB5.46KB▼ 48.18%