89% powerpack-for-learndash

Code Review | PowerPack for LearnDash

WordPress plugin PowerPack for LearnDash scored 89% from 54 tests.

About plugin

  • Plugin page: powerpack-for-lea...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2021
  • Latest release: Sep 1, 2023
  • Number of updates: 16
  • Update frequency: every 57.1 days
  • Top authors: Jack Kitterhing (75%)honorswp (31.25%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active / 19,443 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
Install script ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.13ms] Passed 4 tests

Server-side resources used by PowerPack for LearnDash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4441.57 ▲0.08
Dashboard /wp-admin3.74 ▲0.4347.73 ▼1.88
Posts /wp-admin/edit.php3.85 ▲0.5046.63 ▲2.00
Add New Post /wp-admin/post-new.php6.32 ▲0.4396.73 ▼4.70
Media Library /wp-admin/upload.php3.66 ▲0.4344.60 ▲9.39
PowerPack /wp-admin/admin.php?page=learndash-powerpack3.6441.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 68 new files
Database: no new tables, 7 new options
New WordPress options
ld_powerpack_version
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by PowerPack for LearnDash
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.61 ▼1.081.52 ▼0.2540.35 ▼2.93
Dashboard /wp-admin2,225 ▲375.89 ▼0.02102.91 ▼10.0041.06 ▼9.74
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0438.06 ▼0.5438.49 ▲2.57
Add New Post /wp-admin/post-new.php1,544 ▲1123.10 ▼0.31648.17 ▼2.7560.93 ▲0.78
Media Library /wp-admin/upload.php1,404 ▲164.19 ▼0.09113.95 ▲9.7248.72 ▲0.36
PowerPack /wp-admin/admin.php?page=learndash-powerpack2,1682.0825.7034.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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • ld_powerpack_version
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: education, learndash, elearning, lms, learning

powerpack-for-learndash/learndash-powerpack.php 85% from 13 tests

The entry point to "PowerPack for LearnDash" version 1.3.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • 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 ("powerpack-for-learndash.php" instead of "learndash-powerpack.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
There were no executable files found in this plugin2,688 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP515871,8002,360
CSS3296201
JavaScript21214126
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.81
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes00.00%
Methods170
▷ Static methods52.94%
▷ Public methods170100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 1.34MB with 0.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-2.png149.40KB41.20KB▼ 72.42%
.wordpress-org/screenshot-1.png231.56KB70.45KB▼ 69.58%
.wordpress-org/screenshot-3.png344.76KB98.92KB▼ 71.31%
.wordpress-org/icon-256x256.png56.40KB20.39KB▼ 63.84%
.wordpress-org/banner-1544x500.png384.55KB166.96KB▼ 56.58%