83% mycred-memberpress

Code Review | myCred - MemberPress Integration (Gamification for Membership Sites)

WordPress plugin myCred - MemberPress Integration (Gamification for Membership Sites) scored83%from 54 tests.

About plugin

  • Plugin page: mycred-memberpress
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 28
  • Update frequency: every 36.5 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by myCred - MemberPress Integration (Gamification for Membership Sites)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.72 ▲0.32
Dashboard /wp-admin3.36 ▲0.0650.48 ▼3.05
Posts /wp-admin/edit.php3.41 ▲0.0649.50 ▼0.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0683.33 ▼18.07
Media Library /wp-admin/upload.php3.29 ▲0.0637.29 ▲2.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for myCred - MemberPress Integration (Gamification for Membership Sites)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8314.58 ▲0.211.63 ▼0.0541.56 ▼2.59
Dashboard /wp-admin2,212 ▲325.72 ▲0.1994.95 ▲5.0038.23 ▼0.55
Posts /wp-admin/edit.php2,129 ▲291.99 ▼0.0040.32 ▲5.7939.63 ▲2.68
Add New Post /wp-admin/post-new.php1,382 ▼14417.29 ▼6.01602.58 ▼38.7758.75 ▼1.61
Media Library /wp-admin/upload.php1,423 ▲264.28 ▲0.07106.57 ▲5.6143.96 ▲3.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mycred-memberpress/mycred-memberpress.php on line 19
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mycred-memberpress/mycred-memberpress.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mycred-memberpress/mycred-memberpress.php on line 19

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in mycred-memberpress/assets to your readme.txt
You can look at the official readme.txt

mycred-memberpress/mycred-memberpress.php 77% from 13 tests

This is the main PHP file of "myCred - MemberPress Integration (Gamification for Membership Sites)" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WP 4.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin359 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26979359

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin