84% wplms-unit-access-addon

Code Review | WPLMS Unit Access Addon

WordPress plugin WPLMS Unit Access Addon scored84%from 54 tests.

About plugin

  • Plugin page: wplms-unit-access...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: May 24, 2017
  • Latest release: Nov 5, 2022
  • Number of updates: 9
  • Update frequency: every 221.3 days
  • Top authors: alexhal (88.89%)VibeThemes (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼13.07ms] Passed 4 tests

A check of server-side resources used by WPLMS Unit Access Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.35 ▲0.71
Dashboard /wp-admin3.35 ▲0.0048.61 ▼22.38
Posts /wp-admin/edit.php3.40 ▲0.0448.31 ▼6.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.51 ▼23.15
Media Library /wp-admin/upload.php3.27 ▲0.0439.18 ▼0.21

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WPLMS Unit Access Addon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.061.69 ▲0.0443.91 ▼0.07
Dashboard /wp-admin2,198 ▲305.63 ▲0.0396.23 ▼5.3140.11 ▼5.88
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0033.33 ▼7.8435.15 ▼2.88
Add New Post /wp-admin/post-new.php1,528 ▼023.23 ▲0.13662.41 ▼35.2365.77 ▲19.32
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.02107.95 ▲4.7745.71 ▼1.10

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wplms-unit-access-addon/classes/wplms_uaa_class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 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: learning management system, wplms, lms, unit, elearning...

wplms-unit-access-addon/wplms-unit-access-addon.php 92% from 13 tests

This is the main PHP file of "WPLMS Unit Access Addon" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin155 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24724155

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.67
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected