78% product-license-manager

Code Review | Woocommerce Product License Manager

WordPress plugin Woocommerce Product License Manager scored78%from 54 tests.

About plugin

  • Plugin page: product-license-m...
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Jul 2, 2018
  • Number of updates: 18
  • Update frequency: every 16.1 days
  • Top authors: wptaskforce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Woocommerce Product License Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.87 ▼2.63
Dashboard /wp-admin3.31 ▲0.0067.61 ▲15.01
Posts /wp-admin/edit.php3.36 ▲0.0050.71 ▲3.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.10 ▼15.57
Media Library /wp-admin/upload.php3.23 ▲0.0037.07 ▼1.73

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Product License Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.33 ▼1.321.92 ▼0.4047.04 ▼0.43
Dashboard /wp-admin2,200 ▲185.98 ▲0.89106.22 ▲1.4240.80 ▲0.30
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0035.97 ▼3.5036.11 ▼0.35
Add New Post /wp-admin/post-new.php1,533 ▲1423.28 ▲0.43659.99 ▼19.2953.91 ▲1.71
Media Library /wp-admin/upload.php1,391 ▲64.13 ▼0.11121.22 ▲5.9252.45 ▲3.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/product-license-manager/admin/templates/ads.tpl.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-license-manager/admin/classes/class-script.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-license-manager/admin/templates/license.tpl.php:2
    • > PHP Warning
      Use of undefined constant PLM_URL - assumed 'PLM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-license-manager/admin/templates/ads.tpl.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-license-manager/admin/templates/settings.tpl.php:2
    • > PHP Warning
      Use of undefined constant PLM_PATH - assumed 'PLM_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-license-manager/admin/classes/class-log-debug.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-license-manager/admin/templates/integration.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-license-manager/admin/classes/class-listener.php:245
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-license-manager/admin/classes/class-log-debug.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-license-manager/admin/templates/manage-license.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PLM_List_Table' not found in wp-content/plugins/product-license-manager/admin/classes/class-license-table.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: You can look at the official readme.txt

product-license-manager/product-license-manager.php 92% from 13 tests

Analyzing the main PHP file in "Woocommerce Product License Manager" version 4.0.1
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 314 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin3,454 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP172284291,927
CSS254621,475
JavaScript21552

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity24.50
▷ Minimum class complexity3.00
▷ Maximum class complexity85.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods91
▷ Static methods77.69%
▷ Public methods91100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants11
▷ Global constants11100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/product-license-manager-logo.png25.70KB3.75KB▼ 85.42%