83% easy-digital-downloads-sales-number

Code Review | Easy Digital Downloads - Sales Number

WordPress plugin Easy Digital Downloads - Sales Number scored83%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2015
  • Latest release: Oct 23, 2016
  • Number of updates: 11
  • Update frequency: every 53.1 days
  • Top authors: maurisrx (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.17ms] Passed 4 tests

Server-side resources used by Easy Digital Downloads - Sales Number
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.75 ▼7.03
Dashboard /wp-admin3.31 ▲0.0053.63 ▲2.89
Posts /wp-admin/edit.php3.36 ▲0.0050.34 ▼0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.31 ▲2.32
Media Library /wp-admin/upload.php3.23 ▲0.0036.52 ▲0.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads - Sales Number
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼0.991.75 ▲0.0243.15 ▼3.80
Dashboard /wp-admin2,206 ▲214.86 ▼0.01110.44 ▲4.8438.21 ▼13.05
Posts /wp-admin/edit.php2,092 ▼01.97 ▼0.0841.21 ▼0.4934.93 ▼2.37
Add New Post /wp-admin/post-new.php1,533 ▲1323.27 ▲0.21772.84 ▲114.7254.60 ▲1.72
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0199.67 ▼7.1746.62 ▲1.58

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

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

Smoke tests 75% 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 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-digital-downloads-sales-number/edd-sales-number.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Plugin in action), #2 (Plugin in action)
The official readme.txt might help

easy-digital-downloads-sales-number/edd-sales-number.php 69% from 13 tests

The primary PHP file in "Easy Digital Downloads - Sales Number" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-digital-downloads-sales-number.php" instead of "edd-sales-number.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1324952

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png10.33KB4.67KB▼ 54.83%
screenshot-2.png6.81KB3.28KB▼ 51.77%