84% mycred-for-elementor

Code Review | myCred Elementor

WordPress plugin myCred Elementor scored84%from 54 tests.

About plugin

  • Plugin page: mycred-for-elementor
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 36
  • Update frequency: every 38.8 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /15,712 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.02MB] [CPU: ▼7.60ms] Passed 4 tests

Server-side resources used by myCred Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.79 ▼2.41
Dashboard /wp-admin3.34 ▼0.0146.32 ▼14.22
Posts /wp-admin/edit.php3.39 ▲0.0348.04 ▼4.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.72 ▼8.82
Media Library /wp-admin/upload.php3.26 ▲0.0335.62 ▲0.93

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

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

Browser metrics Passed 4 tests

A check of browser resources used by myCred Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3514.68 ▲0.611.54 ▼0.1541.68 ▲1.36
Dashboard /wp-admin2,212 ▲355.57 ▼0.0183.15 ▼18.3639.61 ▼1.66
Posts /wp-admin/edit.php2,117 ▲172.02 ▲0.0141.37 ▼5.0436.78 ▲0.53
Add New Post /wp-admin/post-new.php1,538 ▲1222.96 ▼0.33613.71 ▼53.3356.88 ▲0.26
Media Library /wp-admin/upload.php1,414 ▲174.19 ▲0.0697.19 ▲0.5042.23 ▲0.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-for-elementor/includes/mycred-elem-functions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

mycred-for-elementor/mycred-elementor.php 92% from 13 tests

"myCred Elementor" version 1.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mycred-for-elementor.php" instead of "mycred-elementor.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
No dangerous file extensions were detected3,119 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP118081,9033,119

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.06
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes13.12%
Methods196
▷ Static methods10.51%
▷ Public methods13568.88%
▷ Protected methods6131.12%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin