89% wp-esewa

Code Review | WooCommerce eSewa

WordPress plugin WooCommerce eSewa scored89%from 54 tests.

About plugin

  • Plugin page: wp-esewa
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: May 12, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: phyverse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WooCommerce eSewa
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0140.47 ▼2.45
Dashboard /wp-admin3.36 ▲0.0251.29 ▼6.04
Posts /wp-admin/edit.php3.47 ▲0.0849.69 ▲2.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0187.20 ▼23.06
Media Library /wp-admin/upload.php3.28 ▲0.0138.34 ▼1.07

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce eSewa
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.39 ▲0.031.96 ▼0.1543.94 ▼1.74
Dashboard /wp-admin2,209 ▲295.56 ▼0.1087.48 ▼5.8240.47 ▼4.19
Posts /wp-admin/edit.php2,114 ▲171.99 ▲0.0336.72 ▲0.1637.19 ▲2.65
Add New Post /wp-admin/post-new.php1,544 ▲1818.45 ▼4.69670.86 ▼21.8174.77 ▲9.63
Media Library /wp-admin/upload.php1,417 ▲174.24 ▲0.05101.89 ▼9.9351.02 ▲4.46

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

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

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Settings page.), #2 (Checkout page.)
The official readme.txt is a good inspiration

wp-esewa/woocommerce-esewa.php 85% from 13 tests

The entry point to "WooCommerce eSewa" version 1.2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-esewa.php" instead of "woocommerce-esewa.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
No dangerous file extensions were detected403 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7106218403

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.67
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods32
▷ Static methods39.38%
▷ Public methods2165.62%
▷ Protected methods825.00%
▷ Private methods39.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/wp-assets/icon-128x128.png9.38KB4.48KB▼ 52.28%
assets/wp-assets/banner-772x250.png26.59KB11.51KB▼ 56.73%
assets/wp-assets/screenshot-2.png11.61KB5.67KB▼ 51.20%
assets/wp-assets/screenshot-1.png43.72KB20.40KB▼ 53.33%
assets/images/esewa.png3.20KB1.70KB▼ 47.03%