78% manca-lp-wc-integration

Code Review | Cool Integration for LearnPress & WooCommerce

WordPress plugin Cool Integration for LearnPress & WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: manca-lp-wc-integ...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.1
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: Sep 12, 2023
  • Number of updates: 18
  • Update frequency: every 67.6 days
  • Top authors: matiasanca (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /16,996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.68ms] Passed 4 tests

Analyzing server-side resources used by Cool Integration for LearnPress & WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.91 ▼5.73
Dashboard /wp-admin3.36 ▲0.0548.13 ▼3.92
Posts /wp-admin/edit.php3.41 ▲0.0549.34 ▲2.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.11 ▼19.66
Media Library /wp-admin/upload.php3.28 ▲0.0535.55 ▲3.72

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

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

Browser metrics Passed 4 tests

Cool Integration for LearnPress & WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.231.78 ▼0.1138.68 ▼9.18
Dashboard /wp-admin2,206 ▲204.83 ▼0.26108.95 ▼15.4041.97 ▼3.48
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1740.61 ▲2.5434.95 ▲2.68
Add New Post /wp-admin/post-new.php1,547 ▲1418.53 ▼4.70595.43 ▼74.8463.32 ▲7.28
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0396.62 ▼6.6842.64 ▼1.98

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/manca-lp-wc-integration/admin/course-product-sync.php
    • > /wp-content/plugins/manca-lp-wc-integration/public/public.php
    • > /wp-content/plugins/manca-lp-wc-integration/admin/includes/lp-admin-functions.php
    • > /wp-content/plugins/manca-lp-wc-integration/admin/admin.php
    • > /wp-content/plugins/manca-lp-wc-integration/admin/includes/wc-admin-functions.php
    • > /wp-content/plugins/manca-lp-wc-integration/admin/enrollment-sync.php
    • > /wp-content/plugins/manca-lp-wc-integration/settings.php
    • > /wp-content/plugins/manca-lp-wc-integration/admin/includes/wp-admin-functions.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/manca-lp-wc-integration/lp-wc-integration.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: sync, integration, auto enrollment, course, learnpress...

manca-lp-wc-integration/lp-wc-integration.php 92% from 13 tests

The main PHP file in "Cool Integration for LearnPress & WooCommerce" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("manca-lp-wc-integration.php" instead of "lp-wc-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin257 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP1079185257

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
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 images were found in this plugin