89% maalipay-for-woocommerce

Code Review | MaaliPay for WooCommerce

WordPress plugin MaaliPay for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: maalipay-for-wooc...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2021
  • Latest release: Jun 24, 2021
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: maalicard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /286 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.04MB] [CPU: ▼11.51ms] Passed 4 tests

A check of server-side resources used by MaaliPay for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.38 ▼4.22
Dashboard /wp-admin3.35 ▲0.0149.77 ▼18.55
Posts /wp-admin/edit.php3.40 ▲0.0549.77 ▼3.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.25 ▼20.21
Media Library /wp-admin/upload.php3.28 ▲0.0540.57 ▼1.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by MaaliPay for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.38 ▼0.291.67 ▲0.0142.75 ▼0.86
Dashboard /wp-admin2,198 ▲185.62 ▼0.0885.56 ▼10.1439.93 ▼3.22
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0439.83 ▲5.1036.56 ▲0.14
Add New Post /wp-admin/post-new.php1,545 ▲1923.10 ▲5.68688.61 ▲13.9849.47 ▼18.29
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.07103.01 ▼8.9846.17 ▼2.87

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can look at the official readme.txt

maalipay-for-woocommerce/index.php 69% from 13 tests

The primary PHP file in "MaaliPay for WooCommerce" version 1.0.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.4.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("maalipay-for-woocommerce.php" instead of "index.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin1,072 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6162743983
CSS11753
JavaScript25636

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity23.00
▷ Minimum class complexity7.00
▷ Maximum class complexity44.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods68
▷ Static methods11.47%
▷ Public methods2638.24%
▷ Protected methods4261.76%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/maalipay-logo.png55.25KB21.50KB▼ 61.08%
assets/images/forwards-logo.png1.02KB1.30KB0.00%
assets/images/maalicard-icon.png4.00KB1.90KB▼ 52.50%