68% academy

Code Review | Academy LMS – eLearning and online course solution for WordPress

WordPress plugin Academy LMS – eLearning and online course solution for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: academy
  • Plugin version: 1.9.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2021
  • Latest release: Oct 22, 2023
  • Number of updates: 107
  • Update frequency: every 9.0 days
  • Top authors: academylms (97.2%)wpmicrolab (3.74%)

Code review

54 tests

User reviews

42 reviews

Install metrics

1,000+ active /36,680 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲2.39MB] [CPU: ▲10.88ms] Passed 4 tests

An overview of server-side resources used by Academy LMS – eLearning and online course solution for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.90 ▲2.4355.59 ▲12.92
Dashboard /wp-admin5.69 ▲2.3558.25 ▼0.95
Posts /wp-admin/edit.php5.76 ▲2.4065.92 ▲20.32
Add New Post /wp-admin/post-new.php8.66 ▲2.77104.33 ▲11.23
Media Library /wp-admin/upload.php5.61 ▲2.3857.19 ▲28.57
Academy Setup /wp-admin/options-writing.php?page=academy-setup5.4137.74
Get Pro /wp-admin/admin.php?page=academy-get-pro5.7148.00
Settings /wp-admin/admin.php?page=academy-settings5.8764.28
Tools /wp-admin/admin.php?page=academy-tools5.8752.83
Lessons /wp-admin/admin.php?page=academy-lessons5.8751.01
Instructors /wp-admin/admin.php?page=academy-instructors5.8756.98
Announcements /wp-admin/admin.php?page=academy-announcements5.8753.65
Question & Answer /wp-admin/admin.php?page=academy-question_answer5.8756.26
Analytics /wp-admin/admin.php?page=academy5.8752.04
Courses /wp-admin/admin.php?page=academy-courses5.8754.43

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 255 new files
Database: 2 new tables, 11 new options
New tables
wp_academy_lessons
wp_academy_lessonmeta
New WordPress options
widget_recent-comments
academy_first_install_time
widget_recent-posts
academy_db_version
theysaidso_admin_options
academy_version
academy_permalinks
db_upgraded
can_compress_scripts
academyut_notification_times
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Academy LMS – eLearning and online course solution for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16214.25 ▼0.121.87 ▲0.3240.73 ▼1.57
Dashboard /wp-admin2,279 ▲1155.66 ▲0.1398.25 ▲4.1241.21 ▼3.70
Posts /wp-admin/edit.php2,184 ▲841.98 ▲0.0141.16 ▲1.6435.19 ▼1.62
Add New Post /wp-admin/post-new.php1,587 ▲5922.52 ▼0.65676.74 ▲27.0556.07 ▼6.86
Media Library /wp-admin/upload.php1,487 ▲844.22 ▲0.02114.42 ▲15.6046.20 ▲3.24
Academy Setup /wp-admin/options-writing.php?page=academy-setup280.420.073.58
Get Pro /wp-admin/admin.php?page=academy-get-pro4,20614.15503.91388.80
Settings /wp-admin/admin.php?page=academy-settings1,24712.74335.9646.16
Tools /wp-admin/admin.php?page=academy-tools1,35612.42184.6354.74
Lessons /wp-admin/admin.php?page=academy-lessons1,40113.70210.8442.34
Instructors /wp-admin/admin.php?page=academy-instructors1,32812.98187.5944.16
Announcements /wp-admin/admin.php?page=academy-announcements1,33512.82195.3840.94
Question & Answer /wp-admin/admin.php?page=academy-question_answer1,58315.01197.6541.10
Analytics /wp-admin/admin.php?page=academy1,46413.30220.4451.76
Courses /wp-admin/admin.php?page=academy-courses1,37012.98213.9148.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_academy_lessons
    • wp_academy_lessonmeta
  • Zombie WordPress options were found after uninstall: 11 options
    • academy_db_version
    • theysaidso_admin_options
    • academyut_notification_times
    • widget_theysaidso_widget
    • can_compress_scripts
    • academy_first_install_time
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • academy_permalinks
    • ...

Smoke tests 50% 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 take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/academy/templates/instructor/reviews.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/academy/templates/instructor/tab-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/academy/templates/global/courses.php:4
    • > PHP Notice
      Undefined variable: reviews in wp-content/plugins/academy/templates/instructor/reviews.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/academy/templates/instructor/tab-navbar.php:2
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/academy/templates/instructor/reviews.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/academy/templates/instructor/header.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-writing.php?page=academy-setup
    • > Network (severe)
    wp-admin/options-writing.php?page=academy-setup - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=academy-get-pro
    • > Console-api (warning) in unknown
    https://client.crisp.chat/static/javascripts/client.js?f51b12a 6:241982 "[WARNING] Crisp found shims of native JavaScript methods. This can alter the chatbox behavior and break things. Make sure not to override listed functions to ensure your chatbox works as expected. You may be looking for other JavaScript libraries in use on this page.\n\nYou can disable this warning by adding: $crisp.push([\"safe\", true]) to your page JavaScript.\n\nMethods to check:" Array(1)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

academy/academy.php Passed 13 tests

The primary PHP file in "Academy LMS – eLearning and online course solution for WordPress" version 1.9.2 is used by WordPress to initiate all plugin functionality
51 characters long description:
Share your knowledge by launching an online course.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin29,941 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PHP2002,9331,99225,159
SVG13113,031
JavaScript936611,167
CSS932584

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 228)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.66
▷ Minimum class complexity1.00
▷ Maximum class complexity228.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity228.00
Code structure
Namespaces32
Interfaces7
Traits11
Classes114
▷ Abstract classes21.75%
▷ Concrete classes11298.25%
▷ Final classes43.57%
Methods816
▷ Static methods29135.66%
▷ Public methods77294.61%
▷ Protected methods313.80%
▷ Private methods131.59%
Functions62
▷ Named functions5283.87%
▷ Anonymous functions1016.13%
Constants24
▷ Global constants2291.67%
▷ Class constants28.33%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/add-review.png2.72KB1.40KB▼ 48.76%
assets/images/expire.png82.39KB29.90KB▼ 63.71%
(invalid) assets/images/profile.png2.08KB0.00KB▼ 100.00%
assets/images/setup/image-2.png78.84KB30.26KB▼ 61.62%
assets/images/thumbnail-placeholder.png10.99KB5.45KB▼ 50.41%