83% mycred-for-buddypress-compliments

Code Review | myCred for BuddyPress Compliments

WordPress plugin myCred for BuddyPress Compliments scored83%from 54 tests.

About plugin

  • Plugin page: mycred-for-buddyp...
  • Plugin version: 1.1.4
  • 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 30, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 26
  • Update frequency: every 54.5 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,107 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by myCred for BuddyPress Compliments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.00 ▼0.90
Dashboard /wp-admin3.38 ▲0.0348.17 ▼14.53
Posts /wp-admin/edit.php3.49 ▲0.1343.77 ▼3.01
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.16 ▼8.02
Media Library /wp-admin/upload.php3.30 ▲0.0637.10 ▲2.52

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

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

Browser metrics Passed 4 tests

A check of browser resources used by myCred for BuddyPress Compliments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.31 ▲0.031.76 ▲0.1043.89 ▼0.39
Dashboard /wp-admin2,195 ▲185.66 ▲0.0486.86 ▼6.0938.21 ▼8.96
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0237.85 ▲0.2732.60 ▼6.70
Add New Post /wp-admin/post-new.php1,526 ▼023.41 ▲0.01641.44 ▼46.8656.31 ▼8.40
Media Library /wp-admin/upload.php1,397 ▼64.15 ▼0.0397.77 ▲0.0443.03 ▼2.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-buddypress-compliments/mycred-buddypress-compliments.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

mycred-for-buddypress-compliments/mycred-buddypress-compliments.php 77% from 13 tests

The main PHP script in "myCred for BuddyPress Compliments" version 1.1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WP 4.8")
  • Main file name: The principal plugin file should be the same as the plugin slug ("mycred-for-buddypress-compliments.php" instead of "mycred-buddypress-compliments.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin314 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP266124212
PO File22630102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin