83% mycred-wp-simple-pay-addon

Code Review | myCred WP Simple Pay - Stripe Payment Addon

WordPress plugin myCred WP Simple Pay - Stripe Payment Addon scored83%from 54 tests.

About plugin

  • Plugin page: mycred-wp-simple-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 20
  • Update frequency: every 52.2 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by myCred WP Simple Pay - Stripe Payment Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.01 ▼2.79
Dashboard /wp-admin3.35 ▲0.0048.95 ▼15.97
Posts /wp-admin/edit.php3.40 ▲0.0451.24 ▲0.38
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.53 ▼14.55
Media Library /wp-admin/upload.php3.27 ▲0.0434.83 ▲0.53

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

myCred WP Simple Pay - Stripe Payment Addon: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5014.24 ▼0.061.84 ▲0.1143.68 ▲2.51
Dashboard /wp-admin2,199 ▲225.51 ▼0.1686.68 ▼11.1138.98 ▼4.62
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0137.80 ▲2.1833.96 ▼4.78
Add New Post /wp-admin/post-new.php1,533 ▲722.99 ▼0.16699.17 ▲26.4052.60 ▼11.07
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.04104.13 ▲3.9741.80 ▼2.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mycred-wp-simple-pay-addon/mycred-simple-pay-integration.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-wp-simple-pay-addon/mycred-simple-pay-integration.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-wp-simple-pay-addon/mycred-simple-pay-integration.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #2, #3, #4, #5, #6, #7, #8, #9 in mycred-wp-simple-pay-addon/assets to your readme.txt
The official readme.txt might help

mycred-wp-simple-pay-addon/mycred-simple-pay-integration.php 69% from 13 tests

Analyzing the main PHP file in "myCred WP Simple Pay - Stripe Payment Addon" version 1.0.3
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("mycred-wp-simple-pay-addon.php" instead of "mycred-simple-pay-integration.php")
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 4.8")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

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
Success! There were no dangerous files found in this plugin300 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35064281
JavaScript10019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin