10% product-licensing-system

Code Review | Product Licensing System

WordPress plugin Product Licensing System scored 10% from 54 tests.

About plugin

  • Plugin page: product-licensing...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Dec 16, 2013
  • Latest release: Feb 20, 2014
  • Number of updates: 9
  • Update frequency: every 7.4 days
  • Top authors: panonda (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 2,062 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/product-licensing-system/include/function.php+125
    Uncaught Error: Call to undefined function mysql_real_escape_string() in wp-content/plugins/product-licensing-system/include/function.php:125
    Stack trace:
    #0 wp-content/plugins/product-licensing-system/plicensing.php(26): plicensing_install()
    #1 wp-includes/class-wp-hook.php(310): plicense_plugin_activate()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

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

This is a short check of server-side resources used by Product Licensing System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.74 ▼4.00
Dashboard /wp-admin3.31 ▲0.0046.10 ▼3.22
Posts /wp-admin/edit.php3.36 ▲0.0048.28 ▲3.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.58 ▼4.87
Media Library /wp-admin/upload.php3.23 ▲0.0034.07 ▼2.29

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: 2 new tables, 6 new options
New tables
wp_plicenses_setting
wp_plicenses
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Product Licensing System: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.31 ▼1.071.87 ▲0.0339.99 ▼4.01
Dashboard /wp-admin2,206 ▲185.88 ▲1.0095.56 ▼21.3339.54 ▼6.64
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0440.33 ▲6.8334.81 ▼2.39
Add New Post /wp-admin/post-new.php1,541 ▲2723.31 ▲5.82663.70 ▲8.5353.04 ▼4.25
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0096.53 ▲0.5543.00 ▲2.49

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_plicenses_setting
    • wp_plicenses
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/product-licensing-system/include/function.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

product-licensing-system/plicensing.php 85% from 13 tests

Analyzing the main PHP file in "Product Licensing System" version 1.0
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-licensing-system.php" instead of "plicensing.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin867 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP69724811
JavaScript16042
CSS10014

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.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/plugicon.png0.75KB0.73KB▼ 2.73%
assets/images/mainicon.png0.21KB0.23KB0.00%
assets/images/settingicon.png0.36KB0.35KB▼ 3.25%