68% wp-license-manager

Code Review | WP License Manager

WordPress plugin WP License Manager scored68%from 54 tests.

About plugin

  • Plugin page: wp-license-manager
  • Plugin version: 0.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Apr 27, 2015
  • Number of updates: 24
  • Update frequency: every 7.3 days
  • Top authors: jarkkolaine (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /3,656 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.69MB] [CPU: ▼6.44ms] Passed 4 tests

This is a short check of server-side resources used by WP License Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7340.92 ▼9.39
Dashboard /wp-admin4.03 ▲0.6959.41 ▼6.47
Posts /wp-admin/edit.php4.09 ▲0.7355.61 ▲5.32
Add New Post /wp-admin/post-new.php6.57 ▲0.6891.02 ▼12.92
Media Library /wp-admin/upload.php3.89 ▲0.6641.31 ▲3.02
Licenses /wp-admin/admin.php?page=wp-licenses3.8639.16
Add new /wp-admin/admin.php?page=wp-licenses-new3.8735.93
License Manager Settings /wp-admin/options-general.php?page=wp-license-settings3.8536.98
All Products /wp-admin/edit.php?post_type=wplm_product4.0043.59
Add New /wp-admin/post-new.php?post_type=wplm_product4.0753.04

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 632 new files
Database: 1 new table, 9 new options
New tables
wp_product_licenses
New WordPress options
wp-license-manager_plugin-version
wp-license-manager-db-version
wp-license-manager-rewrite-rules-version
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP License Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲23514.14 ▼0.235.04 ▲3.1143.74 ▼0.39
Dashboard /wp-admin2,276 ▲884.90 ▼0.95105.44 ▼1.0439.40 ▼8.15
Posts /wp-admin/edit.php2,159 ▲672.04 ▲0.0539.06 ▼0.8536.18 ▼1.35
Add New Post /wp-admin/post-new.php1,576 ▲3620.86 ▼2.30642.85 ▲39.9851.70 ▼0.62
Media Library /wp-admin/upload.php1,452 ▲614.26 ▼0.06100.02 ▲1.8442.60 ▼2.72
Licenses /wp-admin/admin.php?page=wp-licenses9481.7024.7326.51
Add new /wp-admin/admin.php?page=wp-licenses-new9272.0425.7027.11
License Manager Settings /wp-admin/options-general.php?page=wp-license-settings8551.7126.6427.57
All Products /wp-admin/edit.php?post_type=wplm_product1,1401.9430.8831.02
Add New /wp-admin/post-new.php?post_type=wplm_product2,3877.69166.3864.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_product_licenses
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • wp-license-manager-db-version
    • wp-license-manager_plugin-version
    • widget_recent-comments
    • wp-license-manager-rewrite-rules-version
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-license-settings
    • > Notice in wp-content/plugins/wp-license-manager/admin/class-wp-license-manager-admin.php+390
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 484× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Common\\ToArrayInterface' not found in wp-content/plugins/wp-license-manager/lib/aws/Guzzle/Plugin/Cookie/Cookie.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Exception\\Parser\\AbstractJsonExceptionParser' not found in wp-content/plugins/wp-license-manager/lib/aws/Aws/Common/Exception/Parser/JsonRestExceptionParser.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Common\\AbstractHasDispatcher' not found in wp-content/plugins/wp-license-manager/lib/aws/Aws/S3/Model/ClearBucket.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Service\\Resource\\ResourceIteratorFactoryInterface' not found in wp-content/plugins/wp-license-manager/lib/aws/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/wp-license-manager/lib/aws/Aws/S3/Exception/UnresolvableGrantByEmailAddressException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/wp-license-manager/lib/aws/Monolog/Processor/MemoryUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Service\\ConfigLoaderInterface' not found in wp-content/plugins/wp-license-manager/lib/aws/Guzzle/Service/CachingConfigLoader.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Log\\AbstractLogAdapter' not found in wp-content/plugins/wp-license-manager/lib/aws/Guzzle/Log/Zf2LogAdapter.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-license-manager/lib/aws/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Common\\Exception\\AwsExceptionInterface' not found in wp-content/plugins/wp-license-manager/lib/aws/Aws/Common/Exception/LogicException.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: license management, licence, updates, license

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

This is the main PHP file of "WP License Manager" version 0.5.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
111 characters long description:
Turn your WordPress site into a license manager for WordPress plugins, themes, and other downloadable products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin37,574 lines of code in 620 files:
LanguageFilesBlank linesComment linesLines of code
PHP6127,75722,99536,576
Markdown41930987
JavaScript242811
CSS2080

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.35
Average class complexity6.53
▷ Minimum class complexity1.00
▷ Maximum class complexity265.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces83
Interfaces77
Traits2
Classes561
▷ Abstract classes386.77%
▷ Concrete classes52393.23%
▷ Final classes20.38%
Methods3,035
▷ Static methods2638.67%
▷ Public methods2,43880.33%
▷ Protected methods47615.68%
▷ Private methods1213.99%
Functions75
▷ Named functions22.67%
▷ Anonymous functions7397.33%
Constants309
▷ Global constants00.00%
▷ Class constants309100.00%
▷ Public constants309100.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
4 PNG files occupy 0.29MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png38.09KB9.73KB▼ 74.46%
assets/screenshot-4.png86.23KB25.53KB▼ 70.39%
assets/screenshot-1.png91.34KB28.24KB▼ 69.09%
assets/screenshot-3.png84.73KB25.77KB▼ 69.59%