84% mycred-retro

Code Review | myCred Retro

WordPress plugin myCred Retro scored84%from 54 tests.

About plugin

  • Plugin page: mycred-retro
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2020
  • Latest release: Jun 1, 2023
  • Number of updates: 23
  • Update frequency: every 56.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

This is a short check of server-side resources used by myCred Retro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0247.38 ▲3.34
Dashboard /wp-admin3.33 ▼0.0153.89 ▼1.90
Posts /wp-admin/edit.php3.38 ▲0.0251.73 ▲3.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.08 ▼6.33
Media Library /wp-admin/upload.php3.25 ▲0.0235.18 ▼2.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for myCred Retro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.25 ▼0.921.72 ▼0.3443.01 ▲0.61
Dashboard /wp-admin2,221 ▲275.83 ▲0.93100.93 ▼3.5341.82 ▲0.12
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0339.71 ▲5.7135.31 ▼2.44
Add New Post /wp-admin/post-new.php1,534 ▲822.98 ▲5.22622.23 ▼45.9748.75 ▼5.84
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0696.35 ▼19.1243.59 ▼5.59

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-retro/mycred-retro.php:98

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: loyalty, retroactive, reward, mycred, points

mycred-retro/mycred-retro.php 85% from 13 tests

Analyzing the main PHP file in "myCred Retro" version 1.2.3
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WP 4.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,405 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54471921,256
PO File15982149

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity20.75
▷ Minimum class complexity11.00
▷ Maximum class complexity31.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods23
▷ Static methods1356.52%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin