89% enhanced-ecommerce-plus-easy-digital-downloads

Code Review | Enhanced Ecommerce Plus for Easy Digital Downloads

WordPress plugin Enhanced Ecommerce Plus for Easy Digital Downloads scored89%from 54 tests.

About plugin

  • Plugin page: enhanced-ecommerc...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 1, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 8
  • Update frequency: every 10.5 days
  • Top authors: varun21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.04ms] Passed 4 tests

A check of server-side resources used by Enhanced Ecommerce Plus for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.81 ▼6.45
Dashboard /wp-admin3.43 ▲0.0842.73 ▼15.03
Posts /wp-admin/edit.php3.54 ▲0.1848.49 ▼0.22
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.18 ▲1.47
Media Library /wp-admin/upload.php3.35 ▲0.1233.58 ▼2.46

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

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

Browser metrics Passed 4 tests

Enhanced Ecommerce Plus for Easy Digital Downloads: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.32 ▼0.981.84 ▲0.1137.85 ▼9.65
Dashboard /wp-admin2,218 ▲305.80 ▲0.9397.29 ▼12.2242.85 ▲1.50
Posts /wp-admin/edit.php2,104 ▲101.98 ▼0.0640.22 ▼0.2135.57 ▲1.41
Add New Post /wp-admin/post-new.php1,548 ▲1523.35 ▼0.13652.97 ▼32.5552.29 ▼5.26
Media Library /wp-admin/upload.php1,403 ▲124.26 ▲0.0899.59 ▼8.8240.00 ▼4.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Plugin Settings.), #2 (Ecommerce Overview in Google™ Analytics), #3 (Shopping Behaviour Analysis in Google™ Analytics), #4 (Product Performance in Google™ Analytics), #5 (Sales Performance in Google™ Analytics)
The official readme.txt is a good inspiration

enhanced-ecommerce-plus-easy-digital-downloads/plugin.php 85% from 13 tests

The main file in "Enhanced Ecommerce Plus for Easy Digital Downloads" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("enhanced-ecommerce-plus-easy-digital-downloads.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin565 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP210962565

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 1.90MB with 1.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png383.60KB116.30KB▼ 69.68%
screenshot-1.png92.15KB24.80KB▼ 73.09%
screenshot-2.png425.98KB135.14KB▼ 68.28%
screenshot-5.png554.90KB173.95KB▼ 68.65%
screenshot-4.png485.50KB154.25KB▼ 68.23%