89% woo-commerce-addon-for-wp-courseware

Code Review | WP Courseware for WooCommerce

WordPress plugin WP Courseware for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-commerce-addo...
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2014
  • Latest release: Aug 8, 2023
  • Number of updates: 42
  • Update frequency: every 75.3 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /41,024 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.70ms] Passed 4 tests

A check of server-side resources used by WP Courseware for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1740.56 ▼1.04
Dashboard /wp-admin3.47 ▲0.1347.72 ▼14.16
Posts /wp-admin/edit.php3.59 ▲0.2350.14 ▲0.71
Add New Post /wp-admin/post-new.php6.05 ▲0.1793.99 ▼6.48
Media Library /wp-admin/upload.php3.40 ▲0.1735.87 ▼1.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Courseware for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.14 ▼0.211.65 ▲0.1340.48 ▲0.94
Dashboard /wp-admin2,203 ▲235.62 ▼0.0489.48 ▼0.9842.59 ▲0.16
Posts /wp-admin/edit.php2,105 ▲52.03 ▲0.0138.94 ▼3.5437.45 ▼3.15
Add New Post /wp-admin/post-new.php1,536 ▲523.23 ▲0.07624.59 ▲51.8572.15 ▲5.22
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.0596.05 ▼3.6843.30 ▲0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: selling online courses, learning management system

woo-commerce-addon-for-wp-courseware/wp-courseware-woo-commerce.php 85% from 13 tests

This is the main PHP file of "WP Courseware for WooCommerce" version 1.4.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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 ("woo-commerce-addon-for-wp-courseware.php" instead of "wp-courseware-woo-commerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin896 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8304742896

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity27.33
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods53
▷ Static methods11.89%
▷ Public methods4483.02%
▷ Protected methods713.21%
▷ Private methods23.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected