84% easy-digital-downloads-internal-notes-for-products

Code Review | Easy Digital Downloads - Internal Notes for Products

WordPress plugin Easy Digital Downloads - Internal Notes for Products scored84%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Dec 12, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: jtsternberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Easy Digital Downloads - Internal Notes for Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.90 ▼8.45
Dashboard /wp-admin3.31 ▲0.0151.38 ▼0.56
Posts /wp-admin/edit.php3.36 ▲0.0157.77 ▲12.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.84 ▼9.06
Media Library /wp-admin/upload.php3.23 ▲0.0039.07 ▲2.66

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

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

Browser metrics Passed 4 tests

Easy Digital Downloads - Internal Notes for Products: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.33 ▼0.031.64 ▼0.3338.40 ▼10.45
Dashboard /wp-admin2,195 ▲185.63 ▲0.0189.45 ▼9.9741.89 ▼3.48
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0641.42 ▲1.3746.47 ▲13.16
Add New Post /wp-admin/post-new.php1,529 ▼623.13 ▲4.76610.43 ▼70.3650.25 ▼30.81
Media Library /wp-admin/upload.php1,400 ▼04.10 ▼0.12102.46 ▲0.0742.97 ▼2.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-digital-downloads-internal-notes-for-products/edd-internal-notes.php:44

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Modified Product Notes metabox)
You can look at the official readme.txt

easy-digital-downloads-internal-notes-for-products/edd-internal-notes.php 92% from 13 tests

The main PHP file in "Easy Digital Downloads - Internal Notes for Products" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-digital-downloads-internal-notes-for-products.php" instead of "edd-internal-notes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171229

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.59KB10.98KB▼ 67.32%