94% software-license-manager-for-woocommerce

Code Review | Software License Manager for WooCommerce

WordPress plugin Software License Manager for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: software-license-...
  • Plugin version: 1.22
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 5.9.2
  • First release: Jun 27, 2019
  • Latest release: Nov 5, 2021
  • Number of updates: 38
  • Update frequency: every 22.7 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 2,038 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼295.95ms] Passed 4 tests

A check of server-side resources used by Software License Manager for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0363.80 ▲16.07
Dashboard /wp-admin3.44 ▲0.0332.79 ▼2.10
Posts /wp-admin/edit.php3.66 ▲0.0236.92 ▼0.50
Add New Post /wp-admin/post-new.php6.91 ▼0.0694.81 ▼1,178.44
Media Library /wp-admin/upload.php3.31 ▲0.0124.94 ▼2.76
Software License Manager for WooCommerce /wp-admin/options-general.php?page=slmforwoocommerce3.2822.53

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
slmforwoocommerce

Browser metrics Passed 4 tests

Checking browser requirements for Software License Manager for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲4715.80 ▲0.016.39 ▲0.462.02 ▼0.07
Dashboard /wp-admin2,893 ▲326.23 ▲0.10115.24 ▼22.93152.45 ▼7.89
Posts /wp-admin/edit.php2,696 ▲83.25 ▲0.0164.18 ▲2.44139.16 ▲2.87
Add New Post /wp-admin/post-new.php1,703 ▲4221.34 ▲4.59458.43 ▲42.84153.22 ▼5.52
Media Library /wp-admin/upload.php1,703 ▲25.53 ▼0.03141.75 ▲0.41186.22 ▼4.14
Software License Manager for WooCommerce /wp-admin/options-general.php?page=slmforwoocommerce1,1462.4254.35112.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/software-license-manager-for-woocommerce/lib/class-slmforwoocommerceadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/software-license-manager-for-woocommerce/lib/class-slmforwoocommerceadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/software-license-manager-for-woocommerce/lib/class-slmforwoocommerce.php:38

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: license key, woocommerce, license

software-license-manager-for-woocommerce/slmforwoocommerce.php 85% from 13 tests

The principal PHP file in "Software License Manager for WooCommerce" v. 1.22 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("software-license-manager-for-woocommerce.php" instead of "slmforwoocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin378 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP491205378

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity27.50
▷ Minimum class complexity27.00
▷ Maximum class complexity28.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin