68% easy-invoice

Code Review | Easy Invoice - WordPress Invoice Plugin

WordPress plugin Easy Invoice - WordPress Invoice Plugin scored68%from 54 tests.

About plugin

  • Plugin page: easy-invoice
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Oct 20, 2022
  • Latest release: Sep 17, 2023
  • Number of updates: 11
  • Update frequency: every 30.2 days
  • Top authors: matrixaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /977 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.79MB] [CPU: ▲1.69ms] Passed 4 tests

Analyzing server-side resources used by Easy Invoice - WordPress Invoice Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7044.90 ▲6.63
Dashboard /wp-admin4.13 ▲0.8247.18 ▼5.20
Posts /wp-admin/edit.php4.18 ▲0.8256.81 ▲10.91
Add New Post /wp-admin/post-new.php6.75 ▲0.8695.84 ▲3.56
Media Library /wp-admin/upload.php4.05 ▲0.8239.41 ▲1.75
Settings /wp-admin/edit.php?post_type=easy-invoice&page=easy-invoice-settings4.3248.73
Addons /wp-admin/edit.php?post_type=easy-invoice&page=ei-addons4.0636.39
All Payments /wp-admin/edit.php?post_type=easy-invoice-payment4.0938.43
All Invoices /wp-admin/edit.php?post_type=easy-invoice4.0938.12
Add New invoice /wp-admin/post-new.php?post_type=easy-invoice4.5065.04

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 743 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
easy_invoice_version
widget_recent-posts
widget_recent-comments
can_compress_scripts
easy_invoice_first_install_time
db_upgraded
theysaidso_admin_options
easy_invoice_invoice_number

Browser metrics Passed 4 tests

Checking browser requirements for Easy Invoice - WordPress Invoice Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.59 ▼0.781.60 ▼0.0443.88 ▲4.97
Dashboard /wp-admin2,251 ▲634.81 ▼0.0896.47 ▼7.6839.83 ▲0.44
Posts /wp-admin/edit.php2,131 ▲422.00 ▼0.0538.33 ▲0.1734.21 ▲2.46
Add New Post /wp-admin/post-new.php1,567 ▲2523.26 ▲4.91605.12 ▼2.9452.67 ▲6.28
Media Library /wp-admin/upload.php1,430 ▲424.21 ▲0.0394.88 ▼8.9342.46 ▼3.97
Settings /wp-admin/edit.php?post_type=easy-invoice&page=easy-invoice-settings1,1503.3052.8627.43
Addons /wp-admin/edit.php?post_type=easy-invoice&page=ei-addons8872.0625.5227.71
All Payments /wp-admin/edit.php?post_type=easy-invoice-payment1,1151.9430.7228.63
All Invoices /wp-admin/edit.php?post_type=easy-invoice1,0511.9630.0030.71
Add New invoice /wp-admin/post-new.php?post_type=easy-invoice3,9067.38157.42115.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • easy_invoice_first_install_time
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • easy_invoice_version
    • easy_invoice_invoice_number

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-invoice/includes/Admin/Templates/Addon/List.php
  • 266× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/easy-invoice/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Tag/Sup.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Tag/Br.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Tag/NewColumn.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/SizeConverter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\MpdfException' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Http/Exception/RequestException.php:5
    • > PHP Fatal error
      Trait 'Mpdf\\Strict' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Writer/PageWriter.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\CrossReference\\AbstractReader' not found in wp-content/plugins/easy-invoice/vendor/setasign/fpdi/src/PdfParser/CrossReference/FixedReader.php:22
    • > PHP Notice
      Undefined index: filename in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/data/out.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/easy-invoice/vendor/mpdf/mpdf/src/Barcode/EanUpc.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: pdf invoice, invoice, custom invoice, wordpress invoice

easy-invoice/easy-invoice.php Passed 13 tests

The entry point to "Easy Invoice - WordPress Invoice Plugin" version 1.0.8 is a PHP file that has certain tags in its header comment area
60 characters long description:
Invoicing plugin for WordPress that supports invoice Payment

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/easy-invoice/includes/Gateways/PayPal/php-paypal-ipn/cert/api_cert_chain.crt
87,723 lines of code in 567 files:
LanguageFilesBlank linesComment linesLines of code
PHP51813,97613,38083,607
CSS11299331,723
Markdown41790709
JavaScript815013663
JSON300505
Sass19741438
XML310075
Bourne Shell1203

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 7,024)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity47.80
▷ Minimum class complexity1.00
▷ Maximum class complexity7,024.00
Average method complexity11.10
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces64
Interfaces25
Traits6
Classes361
▷ Abstract classes143.88%
▷ Concrete classes34796.12%
▷ Final classes164.61%
Methods1,900
▷ Static methods23312.26%
▷ Public methods1,68788.79%
▷ Protected methods623.26%
▷ Private methods1517.95%
Functions88
▷ Named functions6270.45%
▷ Anonymous functions2629.55%
Constants441
▷ Global constants153.40%
▷ Class constants42696.60%
▷ Public constants426100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/addons-placeholder.png6.49KB4.19KB▼ 35.41%
assets/images/upload-image.png2.57KB1.94KB▼ 24.52%