89% mycred-rank-plus

Code Review | myCred Rank Plus

WordPress plugin myCred Rank Plus scored89%from 54 tests.

About plugin

  • Plugin page: mycred-rank-plus
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 6.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 13, 2023
  • Latest release: Oct 31, 2023
  • Number of updates: 9
  • Update frequency: every 2.1 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /103 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by myCred Rank Plus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.79 ▼2.14
Dashboard /wp-admin3.37 ▲0.0646.34 ▼3.09
Posts /wp-admin/edit.php3.42 ▲0.0750.21 ▼11.82
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.40 ▼11.26
Media Library /wp-admin/upload.php3.29 ▲0.0636.35 ▲1.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for myCred Rank Plus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.56 ▼0.1544.07 ▼0.47
Dashboard /wp-admin2,198 ▲215.61 ▲0.0384.59 ▼14.4839.43 ▼3.19
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0335.70 ▼2.1732.78 ▼6.59
Add New Post /wp-admin/post-new.php1,535 ▲718.41 ▼4.87645.37 ▼25.4067.57 ▲13.84
Media Library /wp-admin/upload.php1,397 ▼34.16 ▲0.0094.11 ▼16.1740.46 ▼9.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: ranks, points, gamification, level, rewards

mycred-rank-plus/mycred-rank-plus.php 85% from 13 tests

The main PHP script in "myCred Rank Plus" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WP 6.2")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
There were no executable files found in this plugin2,973 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP157572962,186
JavaScript321220544
CSS2280132
PO File14658111

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.89
▷ Minimum class complexity6.00
▷ Maximum class complexity109.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods7195.95%
▷ Protected methods34.05%
▷ Private methods00.00%
Functions26
▷ Named functions1869.23%
▷ Anonymous functions830.77%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/ranks-addon.png65.51KB29.21KB▼ 55.41%