90% course-wizard-for-sensei

Code Review | Course Wizard for Sensei

WordPress plugin Course Wizard for Sensei scored90%from 54 tests.

About plugin

  • Plugin page: course-wizard-for...
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Feb 12, 2019
  • Number of updates: 22
  • Update frequency: every 14.6 days
  • Top authors: opendsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,442 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼0.27ms] Passed 4 tests

This is a short check of server-side resources used by Course Wizard for Sensei
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4941.04 ▼0.98
Dashboard /wp-admin3.80 ▲0.5047.16 ▼0.64
Posts /wp-admin/edit.php3.85 ▲0.5053.70 ▲9.16
Add New Post /wp-admin/post-new.php6.32 ▲0.4384.33 ▼6.15
Media Library /wp-admin/upload.php3.72 ▲0.5040.02 ▲6.69

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Course Wizard for Sensei
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.231.63 ▼0.6039.93 ▼4.64
Dashboard /wp-admin2,206 ▲185.79 ▼0.12100.38 ▼13.9640.43 ▼4.24
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.78 ▼0.7839.74 ▲4.01
Add New Post /wp-admin/post-new.php1,514 ▼017.52 ▼0.00692.52 ▼37.8656.35 ▼4.96
Media Library /wp-admin/upload.php1,388 ▲34.37 ▲0.1596.22 ▼11.0741.51 ▼4.27

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • course_wizard_for_sensei_version
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

course-wizard-for-sensei/course-wizard-for-sensei.php Passed 13 tests

The main PHP script in "Course Wizard for Sensei" version 1.7.2 is automatically included on every request by WordPress
56 characters long description:
Wizard to easily design and edit courses for Sensei LMS.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,958 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,4382,0163,339
JavaScript93352831,129
LESS18858332
PO File153105143
JSON10014
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.00
▷ Minimum class complexity5.00
▷ Maximum class complexity73.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods173
▷ Static methods42.31%
▷ Public methods10460.12%
▷ Protected methods6436.99%
▷ Private methods52.89%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 compressed PNG files occupy 0.35MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/cws-screenshot-3.png134.51KB134.51KB0.00%
assets/img/cws-screenshot-4.png54.33KB54.33KB0.01%
assets/img/cws-screenshot-5.png56.73KB56.74KB0.00%
assets/img/cws-screenshot-7.png56.10KB56.11KB0.00%
assets/img/cws-screenshot-2.png40.59KB40.58KB0.03%