84% mycred-blocks

Code Review | myCred - Gutenberg Blocks

WordPress plugin myCred - Gutenberg Blocks scored84%from 54 tests.

About plugin

  • Plugin page: mycred-blocks
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: May 24, 2022
  • Number of updates: 46
  • Update frequency: every 26.9 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /10,416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.30ms] Passed 4 tests

Server-side resources used by myCred - Gutenberg Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.08 ▼3.54
Dashboard /wp-admin3.32 ▲0.0244.99 ▼10.12
Posts /wp-admin/edit.php3.37 ▲0.0144.76 ▼1.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.13 ▼10.14
Media Library /wp-admin/upload.php3.25 ▲0.0135.25 ▼1.29

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for myCred - Gutenberg Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.31 ▼1.441.66 ▼0.1741.84 ▼7.74
Dashboard /wp-admin2,227 ▲365.90 ▲1.02109.79 ▼4.6739.87 ▼6.67
Posts /wp-admin/edit.php2,106 ▲172.02 ▲0.0237.78 ▲3.3033.02 ▼3.27
Add New Post /wp-admin/post-new.php1,546 ▲1323.51 ▲0.27635.12 ▲48.2848.51 ▼2.83
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.05100.00 ▲4.8443.78 ▲2.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-leaderboard/mycred-leaderboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-my-ranks/mycred-my-ranks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-video/mycred-video.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-badges/mycred-badges.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-link/mycred-link.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-total-since/mycred-total-since.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mycred-blocks/includes/mycred-gutenberg-functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-buy/mycred-buy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-transfer/mycred-transfer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-blocks/blocks/mycred-users-of-rank/mycred-users-of-rank.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: You can look at the official readme.txt

mycred-blocks/mycred-blocks.php 92% from 13 tests

"myCred - Gutenberg Blocks" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WP 4.8")

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
No dangerous file extensions were detected3,666 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27148253,130
PHP2918735536

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin