10% woocommerce-my-licences

Code Review | WooCommerce My Licences

WordPress plugin WooCommerce My Licences scored10%from 54 tests.

About plugin

  • Plugin page: woocommerce-my-li...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2015
  • Latest release: Jun 15, 2015
  • Number of updates: 6
  • Update frequency: every 10.3 days
  • Top authors: sebsstudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,244 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/woocommerce-my-licences/woocommerce-my-licences.php+206
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.79ms] Passed 4 tests

Server-side resources used by WooCommerce My Licences
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.31 ▼53.73
Dashboard /wp-admin2.05 ▼1.265.63 ▼47.19
Posts /wp-admin/edit.php2.05 ▼1.316.63 ▼40.42
Add New Post /wp-admin/post-new.php2.05 ▼3.846.64 ▼89.83
Media Library /wp-admin/upload.php2.05 ▼1.187.56 ▼28.52

Server storage [IO: ▲0.06MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce My Licences
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.21 ▼1.161.77 ▼0.1843.28 ▼5.07
Dashboard /wp-admin2,216 ▲315.86 ▼0.02106.57 ▲5.0144.40 ▼0.64
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0140.72 ▲4.4736.76 ▲5.17
Add New Post /wp-admin/post-new.php1,543 ▲1022.98 ▼0.15616.25 ▼61.4850.84 ▼11.56
Media Library /wp-admin/upload.php1,401 ▲104.19 ▼0.0398.62 ▼4.3348.28 ▲0.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/woocommerce-my-licences/woocommerce-my-licences.php+206
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/woocommerce-my-licences/templates/myaccount/my-licences.php:12

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 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: licence, woocommerce, software, api

woocommerce-my-licences/woocommerce-my-licences.php 69% from 13 tests

"WooCommerce My Licences" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 223 characters long)
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

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
Good job! No executable or dangerous file extensions detected261 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP482300261

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.00
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods22
▷ Static methods940.91%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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