84% paid-memberships-pro-for-wp-courseware

Code Review | Paid Memberships Pro Addon for WP Courseware

WordPress plugin Paid Memberships Pro Addon for WP Courseware scored84%from 54 tests.

About plugin

  • Plugin page: paid-memberships-...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2013
  • Latest release: Dec 9, 2022
  • Number of updates: 22
  • Update frequency: every 163.3 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /17,917 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼0.18ms] Passed 4 tests

Server-side resources used by Paid Memberships Pro Addon for WP Courseware
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.01 ▼4.46
Dashboard /wp-admin3.37 ▲0.0745.68 ▼2.74
Posts /wp-admin/edit.php3.49 ▲0.1348.89 ▲2.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.83 ▲5.49
Media Library /wp-admin/upload.php3.30 ▲0.0736.98 ▲4.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Paid Memberships Pro Addon for WP Courseware: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.56 ▼0.851.69 ▼0.1943.22 ▼5.88
Dashboard /wp-admin2,209 ▲215.76 ▲0.8696.72 ▼12.2839.44 ▼0.71
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0439.71 ▲0.8737.09 ▲2.81
Add New Post /wp-admin/post-new.php1,548 ▲1718.35 ▼4.85604.52 ▼75.3056.45 ▼1.23
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0297.71 ▲0.2043.19 ▼0.67

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/paid-memberships-pro-for-wp-courseware/wp-courseware-pmpro.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: selling online courses, learning management system

paid-memberships-pro-for-wp-courseware/wp-courseware-pmpro.php 92% from 13 tests

The primary PHP file in "Paid Memberships Pro Addon for WP Courseware" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paid-memberships-pro-for-wp-courseware.php" instead of "wp-courseware-pmpro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin375 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2157216375

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.50
▷ Minimum class complexity7.00
▷ Maximum class complexity28.00
Average method complexity2.27
▷ 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%
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 were not PNG files found in your plugin