90% degree-of-difficulty-for-sensei

Code Review | Degree of Difficulty for Sensei

WordPress plugin Degree of Difficulty for Sensei scored 90% from 54 tests.

About plugin

  • Plugin page: degree-of-difficu...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Sep 27, 2017
  • Number of updates: 5
  • Update frequency: every 3.2 days
  • Top authors: opendsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,397 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.19MB] [CPU: ▲1.05ms] Passed 4 tests

Server-side resources used by Degree of Difficulty for Sensei
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1948.77 ▼0.43
Dashboard /wp-admin3.54 ▲0.2354.29 ▲6.48
Posts /wp-admin/edit.php3.59 ▲0.2354.36 ▲4.47
Add New Post /wp-admin/post-new.php6.09 ▲0.1991.76 ▼2.83
Media Library /wp-admin/upload.php3.40 ▲0.1739.65 ▲3.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
wpdb_term_image_version
can_compress_scripts
widget_recent-comments
db_upgraded
Degree_of_Difficulty_for_Sensei_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Degree of Difficulty for Sensei
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼1113.65 ▼0.054.60 ▲2.4744.06 ▼6.14
Dashboard /wp-admin2,206 ▼05.03 ▲0.1799.73 ▼10.3037.94 ▼0.36
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0235.95 ▼3.9432.31 ▼2.75
Add New Post /wp-admin/post-new.php1,542 ▲523.41 ▲0.48705.22 ▲10.5352.22 ▼8.84
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0094.14 ▼4.7240.87 ▼1.88

Uninstaller [IO: ✅] [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
  • The uninstall procedure has failed, leaving 8 options in the database
    • wpdb_term_image_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • Degree_of_Difficulty_for_Sensei_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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
6 plugin tags: lms, course, woocommerce, sensei, tags...

degree-of-difficulty-for-sensei/degree-of-difficulty-for-sensei.php Passed 13 tests

This is the main PHP file of "Degree of Difficulty for Sensei" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
Sensei LMS add-on to set and display the degree of difficulty of a course.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,671 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP134221,1081,217
JavaScript64060203
Markdown1540111
PO File13240107
CSS10019
JSON10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.62
▷ Minimum class complexity4.00
▷ Maximum class complexity61.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods79
▷ Static methods45.06%
▷ Public methods6886.08%
▷ Protected methods67.59%
▷ Private methods56.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/difficulty-level-beginner.png0.32KB0.14KB▼ 55.59%
assets/images/level-intermediate.png3.83KB4.37KB0.00%
assets/images/niveau-difficulte-intermediaire.png9.89KB9.87KB0.21%
assets/images/level-advanced.png6.40KB6.38KB0.32%
assets/images/level-beginner.png3.23KB3.61KB0.00%