84% enwikuna-license-manager

Code Review | Enwikuna License Manager for WooCommerce

WordPress plugin Enwikuna License Manager for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: enwikuna-license-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2023
  • Latest release: Oct 19, 2023
  • Number of updates: 30
  • Update frequency: every 7.0 days
  • Top authors: enwikuna (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10+ active /763 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.63ms] Passed 4 tests

A check of server-side resources used by Enwikuna License Manager for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.23 ▼2.11
Dashboard /wp-admin3.33 ▲0.0350.53 ▲4.00
Posts /wp-admin/edit.php3.44 ▲0.0947.69 ▲4.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.00 ▼4.33
Media Library /wp-admin/upload.php3.24 ▲0.0139.56 ▲5.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 385 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
elm_admin_notices
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Enwikuna License Manager for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲6614.35 ▼0.301.59 ▲0.1239.48 ▼1.41
Dashboard /wp-admin2,204 ▲305.65 ▼0.0180.69 ▼9.1037.61 ▼6.47
Posts /wp-admin/edit.php2,109 ▲92.09 ▲0.0934.76 ▼0.8533.94 ▼1.36
Add New Post /wp-admin/post-new.php1,538 ▲1023.18 ▼0.01652.60 ▼45.5055.56 ▲3.28
Media Library /wp-admin/upload.php1,415 ▲154.17 ▼0.03107.27 ▲1.4150.23 ▲1.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/src/Exception/WrongKeyOrModifiedCiphertextException.php:5
    • > PHP Warning
      require(defuse-crypto.phar): failed to open stream: No such file or directory in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/dist/phar-testing-autoload.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/src/Exception/BadFormatException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/src/Exception/IOException.php:5
    • > PHP Fatal error
      Uncaught UnexpectedValueException: creating archive "wp-content/plugins/enwikuna-license-manager/vendor/paragonie/random_compat/dist/random_compat.phar" disabled by the php.ini setting phar.readonly in /var/www/wordpress/wp-content/plugins/enwikuna-license-manager/vendor/paragonie/random_compat/other/build_phar.php:12
    • > PHP Fatal error
      require(): Failed opening required 'defuse-crypto.phar' (include_path='.:/usr/share/php') in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/dist/phar-testing-autoload.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php:5
    • > PHP Warning
      require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/enwikuna-license-manager/vendor/paragonie/random_compat/psalm-autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Crypto' not found in wp-content/plugins/enwikuna-license-manager/vendor/defuse/php-encryption/src/RuntimeTests.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'lib/byte_safe_strings.php' (include_path='.:/usr/share/php') in wp-content/plugins/enwikuna-license-manager/vendor/paragonie/random_compat/psalm-autoload.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

enwikuna-license-manager/enwikuna-license-manager.php Passed 13 tests

"Enwikuna License Manager for WooCommerce" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
94 characters long description:
A great and simple solution to easily sell and manage licenses through your WooCommerce store.

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
Good job! No executable or dangerous file extensions detected34,801 lines of code in 354 files:
LanguageFilesBlank linesComment linesLines of code
PHP2374,67313,68218,400
JavaScript701,6006296,009
PO File21,4061,9964,682
CSS14120272,158
Markdown1566201,685
Sass628911,599
JSON200202
XML20029
make19426
SVG3008
Bourne Shell1203
HTML1010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.63
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces54
Interfaces68
Traits0
Classes99
▷ Abstract classes1515.15%
▷ Concrete classes8484.85%
▷ Final classes78.33%
Methods1,440
▷ Static methods1037.15%
▷ Public methods1,22284.86%
▷ Protected methods130.90%
▷ Private methods20514.24%
Functions91
▷ Named functions7683.52%
▷ Anonymous functions1516.48%
Constants81
▷ Global constants33.70%
▷ Class constants7896.30%
▷ Public constants78100.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
There are no PNG files in this plugin