83% mycred-badge-editor

Code Review | myCred Badge Editor

WordPress plugin myCred Badge Editor scored83%from 54 tests.

About plugin

  • Plugin page: mycred-badge-editor
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.2
  • WordPress version: 6.3.1
  • First release: May 15, 2023
  • Latest release: May 15, 2023
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /384 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: ▼7.42ms] Passed 4 tests

Server-side resources used by myCred Badge Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.87 ▼1.68
Dashboard /wp-admin3.31 ▼0.0345.24 ▼15.06
Posts /wp-admin/edit.php3.37 ▲0.0146.49 ▼0.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.31 ▼12.22
Media Library /wp-admin/upload.php3.24 ▲0.0136.93 ▲3.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 291 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

myCred Badge Editor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.22 ▼0.932.04 ▲0.1845.44 ▲7.38
Dashboard /wp-admin2,210 ▲254.85 ▼0.06102.60 ▼3.0939.85 ▼3.00
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0440.45 ▼1.6835.90 ▼2.45
Add New Post /wp-admin/post-new.php1,518 ▲417.54 ▼0.07654.01 ▼16.2544.38 ▼5.16
Media Library /wp-admin/upload.php1,395 ▲104.28 ▲0.07102.53 ▼5.3143.21 ▲0.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function set_user_setting() in wp-content/plugins/mycred-badge-editor/includes/class-mycred-badge-editor.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-badge-editor/mycred-badge-editor.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8, #9 in mycred-badge-editor/assets to your readme.txt
You can look at the official readme.txt

mycred-badge-editor/mycred-badge-editor.php 85% from 13 tests

The primary PHP file in "myCred Badge Editor" version 1.0 is used by WordPress to initiate all plugin 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")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

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
Success! There were no dangerous files found in this plugin4,298 lines of code in 285 files:
LanguageFilesBlank linesComment linesLines of code
SVG2775943,844
JSON200312
PHP369113138
CSS1002
HTML1001
JavaScript1011

PHP code Passed 2 tests

A short review 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.38
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/build/logo192.png1.70KB1.81KB0.00%
assets/build/logo512.png6.48KB7.24KB0.00%