10% om-addon-for-wp-courseware

Code Review | WP Courseware for OptimizeMember

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

About plugin

  • Plugin page: om-addon-for-wp-c...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5
  • WordPress version: 6.3.1
  • First release: Nov 17, 2016
  • Latest release: Aug 12, 2020
  • Number of updates: 6
  • Update frequency: every 226.5 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,464 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
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/om-addon-for-wp-courseware/wp-courseware-optimizemember.php+21
    Undefined index: WS_PLUGIN__

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.98ms] Passed 4 tests

A check of server-side resources used by WP Courseware for OptimizeMember
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.26 ▼1.79
Dashboard /wp-admin3.37 ▲0.0345.67 ▼21.67
Posts /wp-admin/edit.php3.49 ▲0.1347.73 ▼5.54
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.91 ▼10.93
Media Library /wp-admin/upload.php3.30 ▲0.0737.41 ▼0.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Courseware for OptimizeMember
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.45 ▼0.211.80 ▲0.1841.07 ▲0.24
Dashboard /wp-admin2,200 ▲225.58 ▼0.0885.77 ▼9.3140.83 ▼2.70
Posts /wp-admin/edit.php2,105 ▲261.98 ▲0.0039.68 ▼2.4137.57 ▼1.55
Add New Post /wp-admin/post-new.php1,541 ▲1523.27 ▼0.25680.55 ▲10.8152.84 ▲0.16
Media Library /wp-admin/upload.php1,399 ▲24.23 ▼0.0697.04 ▼9.2145.64 ▲0.25

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/om-addon-for-wp-courseware/wp-courseware-optimizemember.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: learning management system, selling online courses

om-addon-for-wp-courseware/wp-courseware-optimizemember.php 92% from 13 tests

The primary PHP file in "WP Courseware for OptimizeMember" version 1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("om-addon-for-wp-courseware.php" instead of "wp-courseware-optimizemember.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin360 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2178208360

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity16.50
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1664.00%
▷ Protected methods728.00%
▷ Private methods28.00%
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

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