100% sensei-media-attachments

Code Review | Sensei LMS Media Attachments

WordPress plugin Sensei LMS Media Attachments scored 100% from 54 tests.

About plugin

  • Plugin page: sensei-media-atta...
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: May 20, 2020
  • Latest release: Mar 25, 2022
  • Number of updates: 13
  • Update frequency: every 52.3 days
  • Top authors: donnapep (69.23%)renathoc (23.08%)yscik8 (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

7,000+ active / 37,888 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼291.49ms] Passed 4 tests

Analyzing server-side resources used by Sensei LMS Media Attachments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1454.12 ▲5.11
Dashboard /wp-admin3.48 ▲0.0733.54 ▲1.05
Posts /wp-admin/edit.php3.71 ▲0.0738.68 ▲1.74
Add New Post /wp-admin/post-new.php6.96 ▼0.0298.35 ▼1,161.41
Media Library /wp-admin/upload.php3.36 ▲0.0626.33 ▼7.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Sensei LMS Media Attachments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2815.65 ▼0.276.96 ▲0.482.11 ▼0.93
Dashboard /wp-admin2,911 ▲536.14 ▼0.07125.74 ▼8.25166.06 ▲4.34
Posts /wp-admin/edit.php2,694 ▲93.23 ▼0.0164.96 ▲2.10138.40 ▼1.52
Add New Post /wp-admin/post-new.php1,752 ▲4120.95 ▲0.03455.48 ▲11.93151.95 ▼3.84
Media Library /wp-admin/upload.php1,695 ▼35.53 ▲0.04139.46 ▼2.19192.97 ▼2.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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)
Even though everything seems fine, this is not 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: downloads, attachments, sensei lms, media

sensei-media-attachments/sensei-media-attachments.php Passed 13 tests

The principal PHP file in "Sensei LMS Media Attachments" v. 2.0.3 is loaded by WordPress automatically on each request
113 characters long description:
Provide your students with easy access to additional learning materials, from audio files to slideshows and PDFs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin393 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP597241282
PO File32268109
CSS1101
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.00
▷ Minimum class complexity10.00
▷ Maximum class complexity34.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods939.13%
▷ Public methods1669.57%
▷ Protected methods00.00%
▷ Private methods730.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin