89% eledo-pdf-attachments-for-woocommerce

Code Review | Eledo PDF Attachments for WooCommerce

WordPress plugin Eledo PDF Attachments for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: eledo-pdf-attachm...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2017
  • Latest release: Oct 1, 2018
  • Number of updates: 13
  • Update frequency: every 25.7 days
  • Top authors: husivargal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,195 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.19MB] [CPU: ▼8.80ms] Passed 4 tests

Analyzing server-side resources used by Eledo PDF Attachments for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2142.31 ▲2.65
Dashboard /wp-admin3.50 ▲0.1548.57 ▼15.99
Posts /wp-admin/edit.php3.61 ▲0.2549.23 ▼1.19
Add New Post /wp-admin/post-new.php6.10 ▲0.2188.17 ▼19.12
Media Library /wp-admin/upload.php3.42 ▲0.1935.20 ▲1.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Eledo PDF Attachments for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.17 ▼1.211.86 ▲0.1444.40 ▲5.69
Dashboard /wp-admin2,211 ▲234.87 ▼0.9897.67 ▼3.9837.59 ▼6.01
Posts /wp-admin/edit.php2,091 ▲22.01 ▲0.0133.98 ▲0.0733.97 ▼1.62
Add New Post /wp-admin/post-new.php1,530 ▲223.23 ▲4.89601.87 ▼1.6347.76 ▼1.27
Media Library /wp-admin/upload.php1,393 ▲24.27 ▲0.0793.96 ▼1.8139.05 ▼5.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

eledo-pdf-attachments-for-woocommerce/woocommerce-eledo-pdf-attachments.php 85% from 13 tests

This is the main PHP file of "Eledo PDF Attachments for WooCommerce" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("eledo-pdf-attachments-for-woocommerce.php" instead of "woocommerce-eledo-pdf-attachments.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,243 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP74144381,456
JavaScript26939549
PO File26668194
CSS10044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity29.71
▷ Minimum class complexity2.00
▷ Maximum class complexity53.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes228.57%
Methods72
▷ Static methods1723.61%
▷ Public methods5779.17%
▷ Protected methods34.17%
▷ Private methods1216.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pdf-icon.png0.50KB0.46KB▼ 8.32%