68% licenses-manager-for-woocommerce

Code Review | Licenses Manager for WooCommerce

WordPress plugin Licenses Manager for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: licenses-manager-...
  • Plugin version: 2.2.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 49
  • Update frequency: every 6.1 days
  • Top authors: quadlayers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,582 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.54ms] Passed 4 tests

An overview of server-side resources used by Licenses Manager for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4344.16 ▲3.95
Dashboard /wp-admin3.82 ▲0.4752.17 ▼11.53
Posts /wp-admin/edit.php3.83 ▲0.4750.67 ▲4.17
Add New Post /wp-admin/post-new.php6.30 ▲0.4095.01 ▼2.75
Media Library /wp-admin/upload.php3.64 ▲0.4040.28 ▲6.63

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 169 new files
Database: 2 new tables, 6 new options
New tables
wp_woocommerce_qlwlm_activations
wp_woocommerce_qlwlm_licenses
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Licenses Manager for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17514.35 ▲0.031.92 ▼0.0541.48 ▼3.54
Dashboard /wp-admin2,302 ▲1285.62 ▲0.0191.12 ▼13.2643.38 ▲0.65
Posts /wp-admin/edit.php2,110 ▲71.96 ▲0.0341.34 ▲0.8138.55 ▲3.19
Add New Post /wp-admin/post-new.php1,537 ▲1123.45 ▲0.08602.28 ▼95.3551.06 ▼8.67
Media Library /wp-admin/upload.php1,412 ▲124.18 ▼0.0397.60 ▼12.3443.22 ▼4.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_woocommerce_qlwlm_activations
    • wp_woocommerce_qlwlm_licenses
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 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 0% from 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/licenses-manager-for-woocommerce/licenses-manager-for-woocommerce.php
    • > /wp-content/plugins/licenses-manager-for-woocommerce/uninstall.php
  • 56× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WLM\\Backend\\Controller\\Products\\Base' not found in wp-content/plugins/licenses-manager-for-woocommerce/lib/backend/controller/products/class-wordpress.php:5
    • > PHP Warning
      require_once(wp-content/plugins/licenses-manager-for-woocommerce/vendor/pinkcrab/wp-psr16-cache/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/licenses-manager-for-woocommerce/vendor/pinkcrab/wp-psr16-cache/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WLM\\Api\\Endpoints\\Base' not found in wp-content/plugins/licenses-manager-for-woocommerce/lib/api/endpoints/frontend/license/class-delete.php:9
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/licenses-manager-for-woocommerce/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlugV2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/licenses-manager-for-woocommerce/vendor/pinkcrab/wp-psr16-cache/tests/Test_File_Cache.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/licenses-manager-for-woocommerce/vendor/pinkcrab/wp-psr16-cache/src/File_Cache.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WLM\\Api\\Endpoints\\Base' not found in wp-content/plugins/licenses-manager-for-woocommerce/lib/api/endpoints/frontend/activation/class-create.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/licenses-manager-for-woocommerce/lib/backend/controller/tables/view/class-list-table.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/licenses-manager-for-woocommerce/lib/backend/controller/orders/view/html-order-activations.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/licenses-manager-for-woocommerce/templates/license/view.php:6

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

readme.txt Passed 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
7 plugin tags: license key, woocommerce software, license, software license, woocommerce downloads...

licenses-manager-for-woocommerce/licenses-manager-for-woocommerce.php 92% from 13 tests

The entry point to "Licenses Manager for WooCommerce" version 2.2.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "4.0")

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
Everything looks great! No dangerous files found in this plugin11,844 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222,5472,7139,986
Markdown153280850
JSON100574
XML3132260
YAML295118
JavaScript391455
CSS2101

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.96
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces40
Interfaces4
Traits5
Classes83
▷ Abstract classes33.61%
▷ Concrete classes8096.39%
▷ Final classes11.25%
Methods611
▷ Static methods20433.39%
▷ Public methods56091.65%
▷ Protected methods223.60%
▷ Private methods294.75%
Functions62
▷ Named functions00.00%
▷ Anonymous functions62100.00%
Constants59
▷ Global constants5898.31%
▷ Class constants11.69%
▷ Public constants1100.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
PNG images were not found in this plugin