77% edd-google-customer-reviews

Code Review | EDD Google Customer Reviews

WordPress plugin EDD Google Customer Reviews scored77%from 54 tests.

About plugin

  • Plugin page: edd-google-custom...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Aug 24, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: dcgws (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by EDD Google Customer Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.01 ▼8.81
Dashboard /wp-admin3.32 ▲0.0148.21 ▼0.69
Posts /wp-admin/edit.php3.37 ▲0.0148.78 ▲0.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.64 ▲1.84
Media Library /wp-admin/upload.php3.24 ▲0.0137.27 ▲2.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by EDD Google Customer Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼1.121.55 ▼0.4143.57 ▼7.26
Dashboard /wp-admin2,206 ▲174.85 ▼0.12105.91 ▼7.4941.94 ▼0.83
Posts /wp-admin/edit.php2,092 ▲62.00 ▼0.0039.94 ▲4.0433.46 ▲3.37
Add New Post /wp-admin/post-new.php1,532 ▲1322.40 ▼0.76691.73 ▲17.7652.71 ▼5.79
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.0395.78 ▼7.0441.49 ▼4.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/edd-google-customer-reviews/public/panels/class-edd-google-customer-reviews-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/edd-google-customer-reviews/admin/panels/general-fields.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/edd-google-customer-reviews/admin/panels/sidebar.php:4

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (You need to activate your plugin from the Settings page by adding your Google Merchant ID. You can access the same from: EDD Google Customer Reviews > EDD Google Customer Reviews.), #2 (Sample opt-in popup modal that will be presented to your customers upon transaction complete.)
You can look at the official readme.txt

edd-google-customer-reviews/edd-google-customer-reviews.php 77% from 13 tests

"EDD Google Customer Reviews" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "4.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin520 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14110483447
CSS21867
JavaScript22546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.38
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/edd_ee_logo.png0.44KB0.80KB0.00%