83% automatic-teachable-student-enrollment-for-woocommerce

Code Review | Automatic Teachable Student Enrollment for WooCommerce

WordPress plugin Automatic Teachable Student Enrollment for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: automatic-teachab...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2023
  • Latest release: Jul 14, 2023
  • Number of updates: 14
  • Update frequency: every 7.3 days
  • Top authors: wooxperto (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /367 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.00MB] [CPU: ▼4.60ms] Passed 4 tests

An overview of server-side resources used by Automatic Teachable Student Enrollment for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.82 ▼3.38
Dashboard /wp-admin3.32 ▼0.0351.31 ▼16.65
Posts /wp-admin/edit.php3.37 ▲0.0150.45 ▲1.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0299.09 ▲5.81
Media Library /wp-admin/upload.php3.24 ▲0.0137.12 ▲0.48

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Automatic Teachable Student Enrollment 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,805 ▲5914.28 ▼0.291.80 ▼0.1543.23 ▲0.46
Dashboard /wp-admin2,211 ▲315.58 ▼0.0985.84 ▼5.9543.09 ▲2.77
Posts /wp-admin/edit.php2,120 ▲202.01 ▼0.0138.03 ▼3.1633.00 ▼5.69
Add New Post /wp-admin/post-new.php1,565 ▲3418.17 ▼5.13634.28 ▲17.4753.50 ▼2.99
Media Library /wp-admin/upload.php1,413 ▲134.24 ▼0.02107.26 ▼0.4042.40 ▼2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-teachable-student-enrollment-for-woocommerce/process/wx-teachable.php:10
    • > PHP Warning
      Use of undefined constant ATSEW_TEACHABLEAPIKEY - assumed 'ATSEW_TEACHABLEAPIKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/automatic-teachable-student-enrollment-for-woocommerce/process/wx-teachable.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/automatic-teachable-student-enrollment-for-woocommerce/process/wx-admin-settings.php:10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Plugin Activeted.), #2 (Teachable API KEY Link.), #3 (Teabable Tab On Woocommerce Settings page.), #4 (Teachable API KEY Example), #5 (Add New Product), #6 (Woocommerce to Teachable Metabox Displaying), #7 (Displaying Teachable Course List in a Drop Down), #8 (Selected Teachable Course), #9 (Publish Product)
Please take inspiration from this readme.txt

automatic-teachable-student-enrollment-for-woocommerce/wx-Teachable.php 77% from 13 tests

"Automatic Teachable Student Enrollment for WooCommerce" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("automatic-teachable-student-enrollment-for-woocommerce.php" instead of "wx-Teachable.php")
  • Description: The description should be shorter than 140 characters (currently 309 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin269 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP310737269

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin