10% membermouse-addon-for-wp-courseware

Code Review | WP Courseware for MemberMouse

WordPress plugin WP Courseware for MemberMouse scored10%from 54 tests.

About plugin

  • Plugin page: membermouse-addon...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2013
  • Latest release: Dec 9, 2022
  • Number of updates: 37
  • Update frequency: every 95.4 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /4,904 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/membermouse-addon-for-wp-courseware/wp-courseware-member-mouse.php+16
    Uncaught Error: Class 'MM_Bundle' not found in wp-content/plugins/membermouse-addon-for-wp-courseware/wp-courseware-member-mouse.php:16
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wpcw_mm_db_cleanup()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

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

An overview of server-side resources used by WP Courseware for MemberMouse
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0046.43 ▲5.18
Dashboard /wp-admin3.35 ▲0.0049.90 ▼10.91
Posts /wp-admin/edit.php3.40 ▲0.0046.47 ▼4.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0087.67 ▼15.11
Media Library /wp-admin/upload.php3.27 ▲0.0035.79 ▼1.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Courseware for MemberMouse
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.061.70 ▲0.2042.92 ▼0.91
Dashboard /wp-admin2,192 ▲125.54 ▼0.0788.91 ▼1.8640.87 ▼4.23
Posts /wp-admin/edit.php2,097 ▼61.99 ▼0.0434.53 ▲0.2738.08 ▲5.73
Add New Post /wp-admin/post-new.php1,547 ▲2118.18 ▼5.23650.51 ▼55.3169.57 ▲18.58
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.03103.39 ▼13.8743.40 ▼3.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/membermouse-addon-for-wp-courseware/wp-courseware-member-mouse.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

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
2 plugin tags: learning management system, selling online courses

membermouse-addon-for-wp-courseware/wp-courseware-member-mouse.php 85% from 13 tests

The principal PHP file in "WP Courseware for MemberMouse" v. 1.9 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("membermouse-addon-for-wp-courseware.php" instead of "wp-courseware-member-mouse.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

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 plugin542 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2190252542

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.50
▷ Minimum class complexity28.00
▷ Maximum class complexity49.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods1866.67%
▷ Protected methods725.93%
▷ Private methods27.41%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There are no PNG files in this plugin