84% most-wanted-wallet-discount-manager

Code Review | MOST_WANTED Wallet Discount Manager

WordPress plugin MOST_WANTED Wallet Discount Manager scored84%from 54 tests.

About plugin

  • Plugin page: most-wanted-walle...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2021
  • Latest release: Jun 10, 2021
  • Number of updates: 5
  • Update frequency: every 8.0 days
  • Top authors: mostwanted_sl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.82ms] Passed 4 tests

Analyzing server-side resources used by MOST_WANTED Wallet Discount Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.06 ▲2.06
Dashboard /wp-admin3.35 ▲0.0449.59 ▲0.53
Posts /wp-admin/edit.php3.40 ▲0.0447.22 ▼14.54
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.15 ▼23.31
Media Library /wp-admin/upload.php3.27 ▲0.0438.94 ▲5.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
yvk_wallet_discount_manager_installDate
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

MOST_WANTED Wallet Discount Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.19 ▼0.161.64 ▲0.0645.47 ▲6.55
Dashboard /wp-admin2,201 ▲215.62 ▼0.0393.56 ▲5.7344.05 ▲1.10
Posts /wp-admin/edit.php2,106 ▲62.12 ▲0.1035.52 ▼6.0933.98 ▼3.21
Add New Post /wp-admin/post-new.php1,532 ▲623.11 ▼0.07656.04 ▼10.0563.19 ▲11.03
Media Library /wp-admin/upload.php1,406 ▲124.33 ▲0.15109.64 ▲12.7345.81 ▲2.62

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • yvk_wallet_discount_manager_installDate
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/most-wanted-wallet-discount-manager/includes/wallet-discount-manager.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: discount manager, manage wallet, checkout, woocommerce, wallet

most-wanted-wallet-discount-manager/plugin.php 92% from 13 tests

"MOST_WANTED Wallet Discount Manager" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("most-wanted-wallet-discount-manager.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43477243

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/images/yvk-logo-small.png1.82KB1.05KB▼ 42.20%