83% content-sell-licenses-for-woocommerce

Code Review | Protected Content Packages For WooCommerce

WordPress plugin Protected Content Packages For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: content-sell-lice...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 21, 2022
  • Latest release: Oct 5, 2023
  • Number of updates: 25
  • Update frequency: every 20.1 days
  • Top authors: oscomsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,067 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Protected Content Packages For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.69 ▲0.27
Dashboard /wp-admin3.31 ▼0.0346.43 ▼11.97
Posts /wp-admin/edit.php3.36 ▲0.0142.50 ▼5.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.28 ▼11.93
Media Library /wp-admin/upload.php3.23 ▲0.0131.14 ▼4.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
csellwoo_enabled
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Protected Content Packages For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.091.66 ▼0.1442.88 ▲0.94
Dashboard /wp-admin2,195 ▲185.52 ▼0.1381.05 ▼4.6038.71 ▼7.11
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0733.51 ▼4.2036.13 ▲3.65
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.19631.09 ▼56.1448.06 ▼4.23
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0295.80 ▼9.8142.83 ▼3.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • csellwoo_enabled
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/content-sell-licenses-for-woocommerce/inc/views/view-csell-access-form.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were 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
Attributes that require attention: You can look at the official readme.txt

content-sell-licenses-for-woocommerce/content-sell-woocommerce.php 85% from 13 tests

The primary PHP file in "Protected Content Packages For WooCommerce" version 1.0.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("content-sell-licenses-for-woocommerce.php" instead of "content-sell-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,402 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP188829622,036
PO File1103117283
JavaScript2341281
CSS1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.85
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods147
▷ Static methods3020.41%
▷ Public methods13088.44%
▷ Protected methods128.16%
▷ Private methods53.40%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants6
▷ Global constants6100.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
No PNG files were detected