78% edd-enhanced-ecommerce

Code Review | EDD Enhanced Ecommerce

WordPress plugin EDD Enhanced Ecommerce scored78%from 54 tests.

About plugin

  • Plugin page: edd-enhanced-ecom...
  • 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 19, 2018
  • Latest release: Aug 23, 2018
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: dcgws (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /834 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: ▼3.37ms] Passed 4 tests

Server-side resources used by EDD Enhanced Ecommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.56 ▼1.91
Dashboard /wp-admin3.32 ▲0.0249.11 ▼7.89
Posts /wp-admin/edit.php3.37 ▲0.0150.18 ▼2.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.77 ▼0.64
Media Library /wp-admin/upload.php3.24 ▲0.0140.13 ▼0.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by EDD Enhanced Ecommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.64 ▼0.942.37 ▲0.4646.02 ▼2.90
Dashboard /wp-admin2,209 ▲185.85 ▲0.74102.28 ▼5.1042.45 ▲1.64
Posts /wp-admin/edit.php2,092 ▲32.13 ▲0.1136.89 ▼3.5133.81 ▼0.27
Add New Post /wp-admin/post-new.php1,532 ▲1321.96 ▼1.41691.78 ▲75.8463.51 ▲10.89
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.04112.97 ▲0.8349.47 ▲2.98

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/edd-enhanced-ecommerce/index.php
    • > /wp-content/plugins/edd-enhanced-ecommerce/public/panels/class-edd-enhanced-ecommerce-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/edd-enhanced-ecommerce/admin/panels/about-plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/edd-enhanced-ecommerce/admin/panels/general-fields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/edd-enhanced-ecommerce/admin/panels/sidebar.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

edd-enhanced-ecommerce/edd-enhanced-ecommerce.php 85% from 13 tests

Analyzing the main PHP file in "EDD Enhanced Ecommerce" version 1.0.0
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.9" instead of "4.0.0")
  • Text Domain: The text domain should only use lowercase characters and dashes

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 detected1,573 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP171286591,303
PO File16262197
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.39
Average class complexity19.50
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods48
▷ Static methods48.33%
▷ Public methods4185.42%
▷ Protected methods00.00%
▷ Private methods714.58%
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

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.35MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/adwords.png19.19KB1.14KB▼ 94.08%
admin/images/shopify_new.png1.32KB1.43KB0.00%
admin/images/edd_ee_logo.png0.44KB0.80KB0.00%
admin/images/plugin_bk.png332.93KB112.32KB▼ 66.26%
admin/images/google_optimize.png1.41KB1.30KB▼ 8.17%