84% mycred-recalculate-points

Code Review | myCRED points recalculate

WordPress plugin myCRED points recalculate scored84%from 54 tests.

About plugin

  • Plugin page: mycred-recalculat...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: May 7, 2015
  • Latest release: May 7, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: rohanveer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,730 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.57ms] Passed 4 tests

Analyzing server-side resources used by myCRED points recalculate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.22 ▼4.02
Dashboard /wp-admin3.31 ▲0.0046.91 ▼3.73
Posts /wp-admin/edit.php3.36 ▲0.0044.83 ▲0.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.47 ▼8.55
Media Library /wp-admin/upload.php3.23 ▲0.0033.37 ▼1.98

Server storage [IO: ▲0.21MB] [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
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for myCRED points recalculate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.071.65 ▼0.1542.40 ▼0.05
Dashboard /wp-admin2,206 ▲185.90 ▼0.00115.54 ▲12.5543.30 ▲7.41
Posts /wp-admin/edit.php2,086 ▼02.19 ▲0.1333.80 ▼4.9535.33 ▼0.04
Add New Post /wp-admin/post-new.php1,545 ▲318.65 ▲0.59609.87 ▲16.2048.57 ▼0.87
Media Library /wp-admin/upload.php1,388 ▲64.22 ▼0.0393.97 ▼4.9940.93 ▼0.45

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-recalculate-points/admin/rtp-custom-recalculate.php:212
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-recalculate-points/admin/rtp-custom-recalculate.php:212

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

mycred-recalculate-points/index.php 92% from 13 tests

"myCRED points recalculate" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("mycred-recalculate-points.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin400 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26698337
JavaScript18959
CSS1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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 functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.19MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png193.47KB64.96KB▼ 66.42%