68% software-license-manager

Code Review | Software License Manager

WordPress plugin Software License Manager scored68%from 54 tests.

About plugin

  • Plugin page: software-license-...
  • Plugin version: 4.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2014
  • Latest release: Jul 25, 2023
  • Number of updates: 99
  • Update frequency: every 32.6 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

1,000+ active /49,898 total downloads

Benchmarks

Plugin footprint 65% 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.24MB] [CPU: ▼4.33ms] Passed 4 tests

Analyzing server-side resources used by Software License Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.71 ▲4.36
Dashboard /wp-admin3.57 ▲0.2646.95 ▲1.94
Posts /wp-admin/edit.php3.68 ▲0.3246.36 ▼0.02
Add New Post /wp-admin/post-new.php6.15 ▲0.2684.91 ▼23.60
Media Library /wp-admin/upload.php3.49 ▲0.2637.40 ▲4.70
Add/Edit Licenses /wp-admin/admin.php?page=wp_lic_mgr_addedit3.4333.62
Manage Licenses /wp-admin/admin.php?page=slm-main3.5036.97
Admin Functions /wp-admin/admin.php?page=wp_lic_mgr_admin_fnc3.4629.79
Settings /wp-admin/admin.php?page=wp_lic_mgr_settings3.4328.97
Integration Help /wp-admin/admin.php?page=lic_mgr_integration_help_page3.4329.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: 2 new tables, 8 new options
New tables
wp_lic_key_tbl
wp_lic_reg_domain_tbl
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
slm_plugin_options
wp_lic_mgr_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Software License Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲15113.98 ▼0.558.72 ▲7.0345.27 ▲3.71
Dashboard /wp-admin2,249 ▲694.98 ▼0.6992.36 ▲6.7540.10 ▼1.21
Posts /wp-admin/edit.php2,159 ▲592.50 ▲0.4736.34 ▼0.0131.82 ▼0.11
Add New Post /wp-admin/post-new.php1,570 ▲4222.89 ▼0.28653.24 ▼2.3935.84 ▼19.68
Media Library /wp-admin/upload.php1,454 ▲514.46 ▲0.24109.47 ▲13.6148.39 ▲3.01
Add/Edit Licenses /wp-admin/admin.php?page=wp_lic_mgr_addedit1,1212.0631.5630.43
Manage Licenses /wp-admin/admin.php?page=slm-main1,1422.0329.7826.42
Admin Functions /wp-admin/admin.php?page=wp_lic_mgr_admin_fnc8721.9927.7628.02
Settings /wp-admin/admin.php?page=wp_lic_mgr_settings9972.0228.0627.31
Integration Help /wp-admin/admin.php?page=lic_mgr_integration_help_page8661.9929.9930.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_lic_key_tbl
    • wp_lic_reg_domain_tbl
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • slm_plugin_options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • wp_lic_mgr_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_lic_mgr_settings
    • > Notice in wp-content/plugins/software-license-manager/menu/slm-lic-settings.php+107
    Undefined index: lic_prefix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lic_mgr_integration_help_page
    • > Notice in wp-content/plugins/software-license-manager/menu/slm-integration-help-page.php+12
    Undefined index: lic_creation_secret
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lic_mgr_integration_help_page
    • > Notice in wp-content/plugins/software-license-manager/menu/slm-integration-help-page.php+13
    Undefined index: lic_verification_secret
    • > GET request to /wp-admin/admin.php?page=wp_lic_mgr_settings
    • > Notice in wp-content/plugins/software-license-manager/menu/slm-lic-settings.php+113
    Undefined index: default_max_domains
    • > GET request to /wp-admin/admin.php?page=wp_lic_mgr_settings
    • > Notice in wp-content/plugins/software-license-manager/menu/slm-lic-settings.php+143
    Undefined index: enable_debug

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
Please take a closer look at the following
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > 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/software-license-manager/menu/slm-list-licenses-class.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/software-license-manager/menu/slm-list-licenses-class.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/software-license-manager/menu/slm-list-licenses-class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/software-license-manager/includes/slm-third-party-integration.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/software-license-manager/slm_installer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/software-license-manager/slm_plugin_core.php:7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/software-license-manager/slm_installer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/software-license-manager/menu/slm-admin-init.php:8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/software-license-manager/slm_plugin_core.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/software-license-manager/slm_plugin_core.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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 need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

software-license-manager/slm_bootstrap.php 92% from 13 tests

Analyzing the main PHP file in "Software License Manager" version 4.5.5
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("software-license-manager.php" instead of "slm_bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,949 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP173562001,800
CSS133501,142
JavaScript1227

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity12.43
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1126.83%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants1252.17%
▷ Class constants1147.83%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin