83% mycred-for-event-espresso-4

Code Review | myCred for Event Espresso 4

WordPress plugin myCred for Event Espresso 4 scored83%from 54 tests.

About plugin

  • Plugin page: mycred-for-event-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Jun 14, 2023
  • Number of updates: 15
  • Update frequency: every 80.7 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by myCred for Event Espresso 4
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.35 ▼10.40
Dashboard /wp-admin3.33 ▼0.0248.08 ▼15.31
Posts /wp-admin/edit.php3.38 ▲0.0248.88 ▼5.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.43 ▼19.94
Media Library /wp-admin/upload.php3.25 ▲0.0240.01 ▲2.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

myCred for Event Espresso 4: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.231.89 ▲0.1240.54 ▼1.11
Dashboard /wp-admin2,198 ▲185.56 ▼0.0988.54 ▼5.1539.70 ▼0.36
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0051.97 ▲12.0439.64 ▲0.85
Add New Post /wp-admin/post-new.php1,535 ▲918.72 ▼4.46717.78 ▲24.5471.98 ▲12.58
Media Library /wp-admin/upload.php1,400 ▲64.22 ▲0.01103.48 ▼2.3243.90 ▲2.44

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-event-espresso-4/mycred-ee.php:97

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 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: events, event expresso, bookings, points

mycred-for-event-espresso-4/mycred-ee.php 77% from 13 tests

The entry point to "myCred for Event Espresso 4" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mycred-for-event-espresso-4.php" instead of "mycred-ee.php")
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 4.0")

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 plugin262 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP696153202
PO File1181960

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.25
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods21
▷ Static methods29.52%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin