94% membersonic-addon-for-wp-courseware

Code Review | WP Courseware for MemberSonic

WordPress plugin WP Courseware for MemberSonic scored 94% from 53 tests.

About plugin

  • Plugin page: membersonic-addon...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8.1
  • WordPress version: 5.8.1
  • First release: Dec 8, 2013
  • Latest release: Sep 9, 2021
  • Number of updates: 21
  • Update frequency: every 137.8 days
  • Top authors: flyplugins (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 2,082 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼274.46ms] Passed 4 tests

Server-side resources used by WP Courseware for MemberSonic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0741.63 ▲8.79
Dashboard /wp-admin3.13 ▲0.0741.29 ▼0.57
Posts /wp-admin/edit.php3.24 ▲0.1342.56 ▲4.38
Add New Post /wp-admin/post-new.php5.49 ▲0.0692.13 ▼1,098.01
Media Library /wp-admin/upload.php3.07 ▲0.0633.29 ▼3.62

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Courseware for MemberSonic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,682 ▲7616.26 ▲0.7010.83 ▲0.2947.63 ▼2.31
Dashboard /wp-admin2,942 ▲925.92 ▲0.05141.80 ▲8.3097.30 ▼7.49
Posts /wp-admin/edit.php2,713 ▲72.68 ▼0.0265.18 ▼2.0181.47 ▼12.27
Add New Post /wp-admin/post-new.php1,859 ▲619.00 ▼0.04370.70 ▼1.01113.42 ▼1.00
Media Library /wp-admin/upload.php1,781 ▲805.00 ▲0.00187.41 ▲30.47117.00 ▲0.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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 no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/membersonic-addon-for-wp-courseware/wp-courseware-membersonic.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

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

membersonic-addon-for-wp-courseware/wp-courseware-membersonic.php 85% from 13 tests

"WP Courseware for MemberSonic" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("membersonic-addon-for-wp-courseware.php" instead of "wp-courseware-membersonic.php")
  • Description: The description should be shorter than 140 characters (currently 142 characters long)

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
No dangerous file extensions were detected384 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2158206384

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.50
▷ Minimum class complexity7.00
▷ Maximum class complexity34.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods1765.38%
▷ Protected methods726.92%
▷ Private methods27.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin