84% attendance-management-for-lifterlms

Code Review | Attendance Management For LifterLMS

WordPress plugin Attendance Management For LifterLMS scored84%from 54 tests.

About plugin

  • Plugin page: attendance-manage...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: May 28, 2022
  • Number of updates: 10
  • Update frequency: every 90.0 days
  • Top authors: muhammadfaizanhaidar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /1,661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.38ms] Passed 4 tests

Server-side resources used by Attendance Management For LifterLMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.06 ▼13.70
Dashboard /wp-admin3.31 ▲0.0048.56 ▲1.30
Posts /wp-admin/edit.php3.36 ▲0.0048.57 ▼2.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.26 ▼10.29
Media Library /wp-admin/upload.php3.23 ▲0.0038.05 ▲0.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Attendance Management For LifterLMS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.26 ▲0.011.62 ▼1.6251.57 ▲9.11
Dashboard /wp-admin2,209 ▲245.91 ▲0.87102.87 ▼1.7840.51 ▼1.95
Posts /wp-admin/edit.php2,086 ▼62.14 ▲0.0938.08 ▼0.2236.60 ▼1.58
Add New Post /wp-admin/post-new.php1,535 ▲222.99 ▼0.13646.00 ▼3.1253.48 ▼17.30
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.03105.30 ▼5.8445.53 ▲2.40

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/attendance-management-for-lifterlms/includes/integration/llmsat-views.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/attendance-management-for-lifterlms/includes/integration/llmsat-views.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/attendance-management-for-lifterlms/includes/integration/llmsat-views.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: engagement, award, submission, nomination, reward...

attendance-management-for-lifterlms/attendance-management-for-lifterlms.php 85% from 13 tests

The main PHP script in "Attendance Management For LifterLMS" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,411 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP122543171,079
CSS2166210
JavaScript210165
Markdown118057

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.62
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods36.38%
▷ Public methods4085.11%
▷ Protected methods12.13%
▷ Private methods612.77%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.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 PNG files occupy 0.47MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.PNG50.92KB21.83KB▼ 57.12%
assets/screenshot-6.PNG55.53KB23.33KB▼ 57.98%
assets/screenshot-2.PNG68.45KB31.47KB▼ 54.01%
assets/screenshot-3.PNG41.41KB18.31KB▼ 55.79%
assets/screenshot-9.PNG71.92KB31.94KB▼ 55.59%