83% cowryz-wallet-payemnt

Code Review | Cowryz - Woocommerce

WordPress plugin Cowryz - Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: cowryz-wallet-pay...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1.3-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: ifeanyilay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.87ms] Passed 4 tests

This is a short check of server-side resources used by Cowryz - Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.17 ▼1.28
Dashboard /wp-admin3.39 ▲0.0451.87 ▼12.67
Posts /wp-admin/edit.php3.44 ▲0.0847.97 ▼2.71
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.33 ▼14.82
Media Library /wp-admin/upload.php3.31 ▲0.0838.71 ▲2.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cowryz - Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.26 ▼1.041.61 ▼0.0540.42 ▲0.39
Dashboard /wp-admin2,224 ▲184.84 ▼1.01105.08 ▼4.5138.88 ▼7.07
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0541.04 ▲2.7436.55 ▲0.88
Add New Post /wp-admin/post-new.php1,554 ▲2318.45 ▼4.55662.98 ▲43.4750.94 ▼2.58
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0097.57 ▼10.5945.55 ▼2.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cowryz-wallet-payemnt/index.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === cowryz-wallet-payemnt === )
  • Screenshots: These screenshots require images: #1 (WooCommerce payment gateway setting page), #2 (Cowryz Wallet Payment setting page), #3 (Cowryz Wallet Payment gateway option at the checkout page)
You can take inspiration from this readme.txt

cowryz-wallet-payemnt/index.php 85% from 13 tests

The primary PHP file in "Cowryz - Woocommerce" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 185 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cowryz-wallet-payemnt.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected448 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12549448

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png34.21KB15.06KB▼ 55.99%
screenshot-1.png40.32KB17.62KB▼ 56.31%
screenshot-3.png39.58KB14.92KB▼ 62.31%
images/logo.png9.54KB5.20KB▼ 45.49%