83% mycred-paid-memberships-pro

Code Review | myCred Paid Memberships Pro

WordPress plugin myCred Paid Memberships Pro scored83%from 54 tests.

About plugin

  • Plugin page: mycred-paid-membe...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 18
  • Update frequency: every 60.2 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,941 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.00ms] Passed 4 tests

An overview of server-side resources used by myCred Paid Memberships Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.20 ▲0.23
Dashboard /wp-admin3.35 ▲0.0045.67 ▼14.41
Posts /wp-admin/edit.php3.40 ▲0.0459.54 ▲11.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.75 ▼2.71
Media Library /wp-admin/upload.php3.27 ▲0.0434.84 ▲0.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

myCred Paid Memberships Pro: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.35 ▼0.351.62 ▼0.0438.02 ▼6.65
Dashboard /wp-admin2,199 ▲195.53 ▼0.0995.39 ▲2.1640.02 ▼0.51
Posts /wp-admin/edit.php2,110 ▲102.10 ▲0.1442.09 ▼0.5937.42 ▼1.67
Add New Post /wp-admin/post-new.php1,606 ▲8023.15 ▼0.07701.10 ▲67.1937.85 ▼18.95
Media Library /wp-admin/upload.php1,410 ▲74.24 ▲0.03103.56 ▼0.9942.03 ▼2.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-paid-memberships-pro/mycred-paid-memberships-pro.php:95
    • > PHP Fatal error
      Uncaught Error: Class 'PMProGateway' not found in wp-content/plugins/mycred-paid-memberships-pro/includes/points_payment/classes/class.mycred_pmp_point_payment.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PMProGateway' not found in wp-content/plugins/mycred-paid-memberships-pro/includes/points_payment/classes/class.mycred_pmp_point_payment.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #2, #3, #4, #5, #6, #7, #8, #9 in mycred-paid-memberships-pro/assets to your readme.txt
Please take inspiration from this readme.txt

mycred-paid-memberships-pro/mycred-paid-memberships-pro.php 85% from 13 tests

This is the main PHP file of "myCred Paid Memberships Pro" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 4.8")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected2,084 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP114724151,893
JavaScript55416143
CSS416048

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity33.33
▷ Minimum class complexity7.00
▷ Maximum class complexity80.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods68
▷ Static methods1623.53%
▷ Public methods6595.59%
▷ Protected methods00.00%
▷ Private methods34.41%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin