87% edd-product-table

Code Review | Product Table - Easy Digital Downloads

WordPress plugin Product Table - Easy Digital Downloads scored 87% from 54 tests.

About plugin

  • Plugin page: edd-product-table
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 28, 2020
  • Latest release: Feb 14, 2021
  • Number of updates: 9
  • Update frequency: every 12.2 days
  • Top authors: mdshuvo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 378 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Product Table - Easy Digital Downloads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0643.72 ▲9.06
Dashboard /wp-admin3.13 ▲0.0852.60 ▲5.41
Posts /wp-admin/edit.php3.18 ▲0.0759.69 ▲11.54
Add New Post /wp-admin/post-new.php5.49 ▲0.05126.54 ▼525.85
Media Library /wp-admin/upload.php3.07 ▲0.0739.45 ▼2.67
Product Table /wp-admin/edit.php?post_type=download&page=eddpt-settings2.8023.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Product Table - Easy Digital Downloads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,870 ▲28816.97 ▲1.3924.93 ▲14.5348.41 ▼0.36
Dashboard /wp-admin3,017 ▲865.99 ▲0.05164.39 ▼4.96115.24 ▼5.14
Posts /wp-admin/edit.php2,792 ▲532.75 ▲0.0482.94 ▲17.6997.21 ▲9.58
Add New Post /wp-admin/post-new.php1,650 ▲3521.31 ▼0.17371.65 ▼8.71141.06 ▲16.50
Media Library /wp-admin/upload.php1,858 ▲515.07 ▲0.04176.55 ▼1.65126.25 ▼6.56
Product Table /wp-admin/edit.php?post_type=download&page=eddpt-settings280.900.1613.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/edd-product-table/eddpt.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/edd-product-table/inc/eddpt-layout.php:111
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/edd-product-table/eddpt.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-product-table/inc/eddpt-functions.php:15
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/edd-product-table/eddpt.php on line 22
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/edd-product-table/eddpt.php on line 22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=download&page=eddpt-settings
    • > Network (severe)
    wp-admin/edit.php?post_type=download&page=eddpt-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

edd-product-table/eddpt.php 77% from 13 tests

The primary PHP file in "Product Table - Easy Digital Downloads" version 1.1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("edd-product-table.php" instead of "eddpt.php")
  • Domain Path: The domain path is invalid: folder "/lang" does not exist

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
There were no executable files found in this plugin992 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP46980342
CSS3494312
JavaScript32216195
SVG10177
Markdown133066

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dataTables/images/sort_both.png0.20KB0.29KB0.00%
assets/dataTables/images/sort_asc.png0.16KB0.25KB0.00%
assets/dataTables/images/sort_desc.png0.15KB0.25KB0.00%