84% mycred-birthdays

Code Review | myCred Birthdays

WordPress plugin myCred Birthdays scored84%from 54 tests.

About plugin

  • Plugin page: mycred-birthdays
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2020
  • Latest release: Apr 13, 2023
  • Number of updates: 23
  • Update frequency: every 57.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /7,804 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.43ms] Passed 4 tests

A check of server-side resources used by myCred Birthdays
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.65 ▼0.54
Dashboard /wp-admin3.35 ▲0.0543.99 ▼3.81
Posts /wp-admin/edit.php3.46 ▲0.1144.80 ▼2.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.03 ▼19.08
Media Library /wp-admin/upload.php3.27 ▲0.0536.43 ▲1.28

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

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

Browser metrics Passed 4 tests

A check of browser resources used by myCred Birthdays
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.191.70 ▲0.0337.46 ▼2.06
Dashboard /wp-admin2,203 ▲155.80 ▼0.1096.18 ▼10.3138.04 ▼5.27
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0138.91 ▼2.5434.32 ▼0.84
Add New Post /wp-admin/post-new.php1,533 ▲1223.17 ▼0.17647.40 ▲22.1153.12 ▲1.89
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0396.15 ▲0.4141.83 ▲0.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-birthdays/mycred-birthdays.php:96

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: achievements, mycred, reward, birthday, birthdays

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

The main file in "myCred Birthdays" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WP 4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin275 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP273135189
PO File2272786

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin