83% mycred-for-rating-form

Code Review | myCred for Rating Form

WordPress plugin myCred for Rating Form scored83%from 54 tests.

About plugin

  • Plugin page: mycred-for-rating...
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 18
  • Update frequency: every 74.5 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,552 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.52ms] Passed 4 tests

Server-side resources used by myCred for Rating Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.18 ▼6.57
Dashboard /wp-admin3.34 ▲0.0048.37 ▼14.87
Posts /wp-admin/edit.php3.46 ▲0.1047.49 ▼0.06
Add New Post /wp-admin/post-new.php5.93 ▲0.04102.24 ▲7.44
Media Library /wp-admin/upload.php3.27 ▲0.0434.29 ▼4.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for myCred for Rating Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.69 ▲0.661.66 ▼0.5239.20 ▼3.85
Dashboard /wp-admin2,198 ▲185.52 ▼0.1484.35 ▼15.0539.78 ▼8.34
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0343.55 ▲4.9843.11 ▲6.95
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.10690.97 ▼22.2753.03 ▼7.40
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.0595.81 ▼14.5542.71 ▼6.71

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-rating-form/mycred-rating-form.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mycred, points, rating, stars, forms

mycred-for-rating-form/mycred-rating-form.php 77% from 13 tests

This is the main PHP file of "myCred for Rating Form" version 1.3.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mycred-for-rating-form.php" instead of "mycred-rating-form.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Requires at least: Required version number should use periods and dots only (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
Good job! No executable or dangerous file extensions detected218 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP261118169
PO File1131349

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin