68% aspl-email-pdf-invoice

Code Review | ASPL Email PDF Invoice

WordPress plugin ASPL Email PDF Invoice scored68%from 54 tests.

About plugin

  • Plugin page: aspl-email-pdf-in...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.3.2
  • WordPress version: 6.3.1
  • First release: May 14, 2020
  • Latest release: Jul 7, 2020
  • Number of updates: 6
  • Update frequency: every 9.0 days
  • Top authors: acespritech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /485 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.16MB] [CPU: ▼48.47ms] Passed 4 tests

This is a short check of server-side resources used by ASPL Email PDF Invoice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6414.16 ▼26.64
Dashboard /wp-admin2.87 ▼0.4819.21 ▼45.10
Posts /wp-admin/edit.php2.87 ▼0.4920.50 ▼31.88
Add New Post /wp-admin/post-new.php2.87 ▼3.0218.75 ▼90.27
Media Library /wp-admin/upload.php2.87 ▼0.3616.33 ▼24.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 119 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ASPL Email PDF Invoice
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.72 ▲0.121.68 ▲0.0942.64 ▲2.63
Dashboard /wp-admin2,212 ▲355.63 ▲0.0986.03 ▼5.7741.01 ▲0.65
Posts /wp-admin/edit.php2,114 ▲111.98 ▼0.0635.47 ▼8.2233.31 ▼5.88
Add New Post /wp-admin/post-new.php1,549 ▲1518.34 ▼0.00675.28 ▲36.7468.54 ▼2.75
Media Library /wp-admin/upload.php1,408 ▲84.27 ▲0.0395.10 ▼9.0843.96 ▼2.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto3.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto2.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto6.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto7.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto4.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto1.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/makefont.php
    • > /wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/tutorial/tuto5.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/aspl-email-pdf-invoice/include/fpdf/makefont/ttfparser.php on line 382

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: invoice, invoice email, email, woocommerce invoice

aspl-email-pdf-invoice/aspl_email_pdf_invoice.php 77% from 13 tests

Analyzing the main PHP file in "ASPL Email PDF Invoice" version 1.1.0
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/i18n/languages/")
  • 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: Name the main plugin file the same as the plugin slug ("aspl-email-pdf-invoice.php" instead of "aspl_email_pdf_invoice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,961 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP293013243,691
HTML597203,240
CSS20030

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity65.71
▷ Minimum class complexity1.00
▷ Maximum class complexity337.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods144
▷ Static methods00.00%
▷ Public methods10673.61%
▷ Protected methods3826.39%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
include/fpdf/tutorial/logo.png2.32KB2.26KB▼ 2.57%