78% wp-course-manager

Code Review | WP Course Manager

WordPress plugin WP Course Manager scored 78% from 54 tests.

About plugin

  • Plugin page: wp-course-manager
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2013
  • Latest release: Jan 4, 2022
  • Number of updates: 20
  • Update frequency: every 151.0 days
  • Top authors: HenrikHoff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 8,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.88ms] Passed 4 tests

Analyzing server-side resources used by WP Course Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.75 ▼3.22
Dashboard /wp-admin3.32 ▲0.0245.47 ▲0.59
Posts /wp-admin/edit.php3.37 ▲0.0148.82 ▼4.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.74 ▲3.19
Media Library /wp-admin/upload.php3.24 ▲0.0132.64 ▼0.12
Edit Courses /wp-admin/admin.php?page=WPCM_edit_courses3.1827.78
Edit Lecturers /wp-admin/admin.php?page=WPCM_edit_lecturers3.1828.29
Edit Schedule /wp-admin/admin.php?page=WPCM_edit_schedule3.1827.84
WP Course Manager /wp-admin/admin.php?page=WPCM_top_options_page3.2227.82

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 37 new files
Database: 4 new tables, 7 new options
New tables
wp_wpcm_courses
wp_wpcm_lecturers
wp_wpcm_schedule
wp_wpcm_course_holders
New WordPress options
widget_recent-posts
can_compress_scripts
wpcm_date_display_setting
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Course Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲19013.61 ▼0.706.27 ▲3.8244.66 ▼1.55
Dashboard /wp-admin2,246 ▲585.79 ▼0.1199.11 ▼9.9738.31 ▼6.84
Posts /wp-admin/edit.php2,129 ▲372.05 ▲0.0042.92 ▼2.2536.36 ▼1.35
Add New Post /wp-admin/post-new.php1,558 ▲2523.38 ▲0.13635.34 ▲9.6957.02 ▼4.50
Media Library /wp-admin/upload.php1,425 ▲374.23 ▲0.0395.91 ▲0.4741.92 ▲1.14
Edit Courses /wp-admin/admin.php?page=WPCM_edit_courses7932.0324.2928.22
Edit Lecturers /wp-admin/admin.php?page=WPCM_edit_lecturers7922.0623.9527.43
Edit Schedule /wp-admin/admin.php?page=WPCM_edit_schedule7912.0324.2025.32
WP Course Manager /wp-admin/admin.php?page=WPCM_top_options_page9892.0222.3424.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • wpcm_date_display_setting
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=WPCM_edit_schedule
    • > Notice in wp-content/plugins/wp-course-manager/wpcm_edit_schedule.php+12
    Undefined index: action
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=WPCM_edit_schedule
    • > Notice in wp-content/plugins/wp-course-manager/wpcm_edit_schedule.php+13
    Undefined index: id
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=WPCM_edit_schedule
    • > Notice in wp-content/plugins/wp-course-manager/wpcm_edit_schedule.php+14
    Undefined index: save

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
The following issues need your attention
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-course-manager/wp-course-manager.php:45
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-course-manager/wpcm_db_access.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The plugin options page. This is where you tell the plugin what pages you have put the shortcodes in.), #2 (Edit lecturer information.), #3 (Manage the schedule. A new scheduled event has just been added.), #4 (The schedule list on the page with the shortcode for listing the schedule. This is how the visitor to the site sees it.), #5 (The schedule list with detailed information about one scheduled event.), #6 (Information about a lecturer, on the page where the shortcode for showing lecturers is put.), #7 (Information about a course, on the page where the shortcode for showing courses is put.)
The official readme.txt might help

wp-course-manager/wp-course-manager.php 92% from 13 tests

The main file in "WP Course Manager" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)

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
No dangerous file extensions were detected2,139 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP93801531,029
JavaScript2150191732
PO File199111245
CSS1292130
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 1.02MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
3.png63.51KB21.29KB▼ 66.48%
4.png25.32KB9.13KB▼ 63.95%
screenshot-5.png48.84KB19.34KB▼ 60.41%
6.png120.73KB41.27KB▼ 65.82%
screenshot-6.png120.73KB41.27KB▼ 65.82%