84% course-session-for-sensei

Code Review | Course Session For Sensei

WordPress plugin Course Session For Sensei scored84%from 54 tests.

About plugin

  • Plugin page: course-session-fo...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.3
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Feb 12, 2019
  • Number of updates: 14
  • Update frequency: every 17.0 days
  • Top authors: opendsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,937 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.66MB] [CPU: ▼1.56ms] Passed 4 tests

An overview of server-side resources used by Course Session For Sensei
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6840.45 ▼1.87
Dashboard /wp-admin3.96 ▲0.6555.12 ▼3.04
Posts /wp-admin/edit.php4.01 ▲0.6651.60 ▼1.71
Add New Post /wp-admin/post-new.php6.66 ▲0.7889.44 ▲0.40
Media Library /wp-admin/upload.php3.88 ▲0.6539.99 ▲2.24
All Course Sessions /wp-admin/edit.php?post_type=course-session3.9340.55
Groups of Sessions /wp-admin/edit-tags.php?taxonomy=group-of-sessions&post_type=course-session3.9043.65
Add New /wp-admin/post-new.php?post_type=course-session6.6687.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
course_session_for_sensei_version
wpdb_term_start_date_version
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
wpdb_term_end_date_version
wpdb_term_course_version
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Course Session For Sensei: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.37 ▼0.001.57 ▼0.1438.51 ▼3.86
Dashboard /wp-admin2,246 ▲695.74 ▲0.1191.68 ▼7.4641.97 ▼0.68
Posts /wp-admin/edit.php2,148 ▲482.23 ▲0.2337.84 ▼0.5934.94 ▲0.94
Add New Post /wp-admin/post-new.php1,571 ▲3123.21 ▲0.10674.16 ▲31.1860.11 ▼0.76
Media Library /wp-admin/upload.php1,445 ▲484.29 ▲0.04100.39 ▼6.8441.67 ▼3.31
All Course Sessions /wp-admin/edit.php?post_type=course-session1,1912.1935.0230.73
Groups of Sessions /wp-admin/edit-tags.php?taxonomy=group-of-sessions&post_type=course-session1,4312.1134.8632.05
Add New /wp-admin/post-new.php?post_type=course-session6,21519.17868.9036.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • wpdb_term_course_version
    • widget_recent-comments
    • theysaidso_admin_options
    • wpdb_term_end_date_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • wpdb_term_start_date_version
    • course_session_for_sensei_version

Smoke tests 75% 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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_sensei_header() in wp-content/plugins/course-session-for-sensei/templates/archive-course-session.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_sensei_header() in wp-content/plugins/course-session-for-sensei/templates/single-course-session.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: date, course, visibility, sensei, session

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

The main file in "Course Session For Sensei" v. 1.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
61 characters long description:
This is your starter template for your next WordPress plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,807 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,4962,6383,242
PO File17493203
JavaScript982155197
LESS22527147
JSON10014
CSS411014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.94
▷ Minimum class complexity2.00
▷ Maximum class complexity82.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods153
▷ Static methods95.88%
▷ Public methods13185.62%
▷ Protected methods159.80%
▷ Private methods74.58%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/css-screenshot-2.png46.43KB46.44KB0.00%
assets/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%