56% memberwunder

Code Review | MemberWunder LMS - Learning Management System - Ein WordPress e-Learning Plugin

WordPress plugin MemberWunder LMS - Learning Management System - Ein WordPress e-Learning Plugin scored56%from 54 tests.

About plugin

  • Plugin page: memberwunder
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.8-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2017
  • Latest release: Dec 21, 2017
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: ezmarketing (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20+ active /3,101 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.89MB] [CPU: ▲7.51ms] Passed 4 tests

Analyzing server-side resources used by MemberWunder LMS - Learning Management System - Ein WordPress e-Learning Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.32 ▲1.8661.50 ▲16.85
Dashboard /wp-admin5.21 ▲1.9161.31 ▲10.56
Posts /wp-admin/edit.php5.26 ▲1.9165.35 ▲16.95
Add New Post /wp-admin/post-new.php8.01 ▲2.12100.10 ▼12.53
Media Library /wp-admin/upload.php5.13 ▲1.9151.73 ▲15.14
MemberWunder /wp-admin/options-general.php?page=memberwunder5.1955.91
MemberWunder /wp-admin/edit.php?post_type=twmembership5.2053.75
Add course /wp-admin/post-new.php?post_type=twmembership8.01109.60

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 263 new files
Database: 2 new tables, 7 new options
New tables
wp_twm_user_lessons
wp_twm_user_lessons_quizes
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
twmembership_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for MemberWunder LMS - Learning Management System - Ein WordPress e-Learning Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11914.72 ▲0.081.77 ▲0.1847.57 ▲9.09
Dashboard /wp-admin2,267 ▲905.63 ▼0.0494.94 ▲5.9242.70 ▲0.38
Posts /wp-admin/edit.php2,152 ▲492.02 ▲0.0238.46 ▲3.0333.43 ▼7.24
Add New Post /wp-admin/post-new.php1,566 ▲4023.20 ▼0.00654.42 ▼12.7352.18 ▼1.69
Media Library /wp-admin/upload.php1,449 ▲464.19 ▼0.0597.88 ▼10.8643.29 ▼4.00
MemberWunder /wp-admin/options-general.php?page=memberwunder5,36011.38411.4665.05
MemberWunder /wp-admin/edit.php?post_type=twmembership1,2803.3776.7031.90
Add course /wp-admin/post-new.php?post_type=twmembership6,82520.85972.9745.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_twm_user_lessons_quizes
    • wp_twm_user_lessons
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • twmembership_version
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=memberwunder
    • > Notice in wp-content/plugins/memberwunder/include/services/smtp.php+294
    Trying to access array offset on value of type bool
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=memberwunder
    • > Notice in wp-content/plugins/memberwunder/include/services/smtp.php+294
    Trying to access array offset on value of type null

SRP 0% from 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/checkbox.php
    • > /wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/full_link.php
    • > /wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/text.php
    • > /wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/textarea.php
    • > /wp-content/plugins/memberwunder/assets/frontend/views/template/blocks/general/message.php
    • > /wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/select.php
  • 103× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/memberwunder/templates/layout/header.php:1
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/memberwunder/assets/dashboard/views/settings/fields/select.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/memberwunder/templates/layout/header.php:1
    • > PHP Notice
      Undefined variable: status in wp-content/plugins/memberwunder/assets/frontend/views/template/blocks/general/message.php on line 3
    • > PHP Notice
      Undefined variable: field_id in wp-content/plugins/memberwunder/assets/dashboard/views/nav_menu/pages.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/memberwunder/templates/layout/head.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'MemberWunder\\Controller\\Options\\Sections\\Section' not found in wp-content/plugins/memberwunder/include/controller/options/sections/leaderboard.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MemberWunder\\Controller\\Options\\Sections\\Section' not found in wp-content/plugins/memberwunder/include/controller/options/sections/design.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/memberwunder/templates/reset-page.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'MemberWunder\\Helpers\\View' not found in wp-content/plugins/memberwunder/assets/dashboard/views/notice.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=twmembership
    • > Network (severe)
    wp-content/plugins/tw-membership/assets/css/images/tooltip.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=twmembership
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

memberwunder/memberwunder.php 77% from 13 tests

The entry point to "MemberWunder LMS - Learning Management System - Ein WordPress e-Learning Plugin" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Plugin Name: Please shorten the plugin name (currently 79 characters long instead of max. 70)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 198 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin18,618 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102,0143,48310,861
LESS15802292,899
CSS6114811,816
JavaScript183801161,719
PO File15998381,314
SVG9009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.57
▷ Minimum class complexity1.00
▷ Maximum class complexity372.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces13
Interfaces0
Traits0
Classes54
▷ Abstract classes00.00%
▷ Concrete classes54100.00%
▷ Final classes00.00%
Methods461
▷ Static methods16535.79%
▷ Public methods23550.98%
▷ Protected methods20043.38%
▷ Private methods265.64%
Functions72
▷ Named functions5272.22%
▷ Anonymous functions2027.78%
Constants18
▷ Global constants1583.33%
▷ Class constants316.67%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
71 PNG files occupy 1.37MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/public/css/img/ok.png7.23KB3.32KB▼ 54.11%
assets/dashboard/images/settings/hints/metabox-text-color.png55.47KB55.64KB0.00%
assets/css/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
assets/css/images/colorpicker_hsb_h.png0.99KB0.77KB▼ 21.94%
templates/public/css/img/slider_arrows.png3.73KB0.90KB▼ 75.84%