84% grassblade-xapi-tutorlms

Code Review | Experience API for TutorLMS by GrassBlade

WordPress plugin Experience API for TutorLMS by GrassBlade scored 84% from 54 tests.

About plugin

  • Plugin page: grassblade-xapi-t...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2022
  • Latest release: Aug 18, 2023
  • Number of updates: 16
  • Update frequency: every 35.1 days
  • Top authors: liveaspankaj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,393 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.76ms] Passed 4 tests

Analyzing server-side resources used by Experience API for TutorLMS by GrassBlade
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.85 ▼4.81
Dashboard /wp-admin3.46 ▲0.1650.63 ▼0.66
Posts /wp-admin/edit.php3.58 ▲0.2252.12 ▲0.66
Add New Post /wp-admin/post-new.php6.04 ▲0.1695.41 ▼6.22
Media Library /wp-admin/upload.php3.39 ▲0.1636.94 ▲2.44
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings3.3733.31
Tutor LMS /wp-admin/admin.php?page=grassblade-xapi-tutorlms3.3731.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Experience API for TutorLMS by GrassBlade
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10413.22 ▼1.361.80 ▼0.3041.79 ▼9.64
Dashboard /wp-admin2,245 ▲544.87 ▲0.02103.01 ▼0.4681.73 ▲37.53
Posts /wp-admin/edit.php2,128 ▲362.03 ▼0.0239.16 ▲0.9435.03 ▲0.16
Add New Post /wp-admin/post-new.php1,564 ▲3118.35 ▼4.77753.03 ▲141.3559.95 ▼6.06
Media Library /wp-admin/upload.php1,427 ▲394.24 ▼0.0796.48 ▼0.3769.07 ▲26.54
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings9152.0126.3233.02
Tutor LMS /wp-admin/admin.php?page=grassblade-xapi-tutorlms8922.0524.1028.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/grassblade-xapi-tutorlms/functions.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grassblade-xapi-tutorlms/functions.php:35
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/grassblade-xapi-tutorlms/functions.php on line 31
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/grassblade-xapi-tutorlms/functions.php on line 31

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

grassblade-xapi-tutorlms/functions.php 92% from 13 tests

Analyzing the main PHP file in "Experience API for TutorLMS by GrassBlade" version 1.3
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("grassblade-xapi-tutorlms.php" instead of "functions.php")

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
Everything looks great! No dangerous files found in this plugin936 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP221264936

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/check.png0.98KB0.47KB▼ 52.44%
img/icon_30x30.png4.58KB1.60KB▼ 65.15%
img/no.png1.01KB0.62KB▼ 39.05%
img/gb_logo.png3.43KB0.84KB▼ 75.48%
img/icon_128x128.png22.67KB6.87KB▼ 69.71%