84% mycred-givewp

Code Review | myCred GiveWP

WordPress plugin myCred GiveWP scored84%from 54 tests.

About plugin

  • Plugin page: mycred-givewp
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Apr 27, 2023
  • Number of updates: 27
  • Update frequency: every 34.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,169 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.01MB] [CPU: ▼7.76ms] Passed 4 tests

Analyzing server-side resources used by myCred GiveWP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.24 ▼3.96
Dashboard /wp-admin3.31 ▼0.0445.32 ▼13.18
Posts /wp-admin/edit.php3.36 ▲0.0042.42 ▼1.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.02 ▼11.96
Media Library /wp-admin/upload.php3.23 ▲0.0033.11 ▼0.98

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for myCred GiveWP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.36 ▲0.001.90 ▲0.1644.27 ▲1.74
Dashboard /wp-admin2,208 ▲315.60 ▼0.0585.71 ▲2.5942.66 ▲1.90
Posts /wp-admin/edit.php2,110 ▲132.02 ▲0.0135.85 ▲1.1834.49 ▼2.72
Add New Post /wp-admin/post-new.php1,537 ▲923.16 ▲0.25664.59 ▲39.7153.21 ▼2.07
Media Library /wp-admin/upload.php1,413 ▲134.15 ▼0.0294.93 ▼0.4043.13 ▲0.85

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-givewp/mycred-give-wp-addon.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: givewp, donations, donation, charity, points system

mycred-givewp/mycred-give-wp-addon.php 85% from 13 tests

Analyzing the main PHP file in "myCred GiveWP" version 1.0.2
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mycred-givewp.php" instead of "mycred-give-wp-addon.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
Good job! No executable or dangerous file extensions detected462 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35792382
JavaScript27468
CSS13012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.00
▷ Minimum class complexity7.00
▷ Maximum class complexity35.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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 are no PNG files in this plugin