83% mycred-for-gd-star-rating

Code Review | myCred for GD Star Rating

WordPress plugin myCred for GD Star Rating scored83%from 54 tests.

About plugin

  • Plugin page: mycred-for-gd-sta...
  • 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 5, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 27
  • Update frequency: every 49.7 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,913 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.16ms] Passed 4 tests

An overview of server-side resources used by myCred for GD Star Rating
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.58 ▼4.58
Dashboard /wp-admin3.37 ▲0.0745.75 ▼3.32
Posts /wp-admin/edit.php3.49 ▲0.1348.11 ▲0.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.37 ▼8.89
Media Library /wp-admin/upload.php3.30 ▲0.0738.53 ▲7.97

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for myCred for GD Star Rating
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.28 ▲0.001.78 ▼0.2635.93 ▼8.93
Dashboard /wp-admin2,198 ▲185.63 ▲0.0199.56 ▼2.4344.43 ▼2.21
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0140.10 ▲2.8435.86 ▼4.67
Add New Post /wp-admin/post-new.php1,529 ▲323.42 ▲0.18627.95 ▼5.6248.36 ▼4.58
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.00100.56 ▼2.8041.31 ▼4.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-gd-star-rating/mycred-gd-star-rating.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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: mycred, stars, rating, gd rating, star rating

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

This is the main PHP file of "myCred for GD Star Rating" 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
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mycred-for-gd-star-rating.php" instead of "mycred-gd-star-rating.php")
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin358 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP270106306
PO File1141452

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity6.00
▷ Maximum class complexity16.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin