77% pepro-ultimate-invoice

Code Review | PeproDev Ultimate Invoice

WordPress plugin PeproDev Ultimate Invoice scored77%from 54 tests.

About plugin

  • Plugin page: pepro-ultimate-in...
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2020
  • Latest release: Apr 5, 2023
  • Number of updates: 90
  • Update frequency: every 11.1 days
  • Top authors: peprodev (94.44%)blackswanlab (6.67%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /40,342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by PeproDev Ultimate Invoice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5735.00 ▼4.55
Dashboard /wp-admin3.87 ▲0.5745.72 ▼2.18
Posts /wp-admin/edit.php3.98 ▲0.6351.95 ▲7.39
Add New Post /wp-admin/post-new.php6.45 ▲0.5791.94 ▼5.28
Media Library /wp-admin/upload.php3.79 ▲0.5643.99 ▲10.79

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 948 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PeproDev Ultimate Invoice
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12313.17 ▼1.231.62 ▲0.0340.08 ▼0.77
Dashboard /wp-admin2,278 ▲904.88 ▼0.9797.77 ▼1.5283.85 ▲39.89
Posts /wp-admin/edit.php2,160 ▲712.02 ▲0.0138.38 ▲2.7936.52 ▲1.61
Add New Post /wp-admin/post-new.php1,746 ▲22424.21 ▲0.94708.96 ▲86.4962.15 ▲12.38
Media Library /wp-admin/upload.php1,451 ▲634.32 ▲0.0498.34 ▼0.8871.73 ▲26.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pepro-ultimate-invoice/include/admin/class-wcproduct-panel.php
    • > /wp-content/plugins/pepro-ultimate-invoice/pepro-ultimate-invoice.php
    • > /wp-content/plugins/pepro-ultimate-invoice/include/admin/class-template.php
    • > /wp-content/plugins/pepro-ultimate-invoice/include/admin/class-column.php
    • > /wp-content/plugins/pepro-ultimate-invoice/include/admin/class-print.php
    • > /wp-content/plugins/pepro-ultimate-invoice/include/admin/class-setting.php
  • 311× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\MpdfException' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Exception/FontException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\SubstituteTag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/Ttz.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/Aside.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/B.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/Hr.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/mpdf/mpdf/src/Tag/H5.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/pepro-ultimate-invoice/include/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed: The official readme.txt is a good inspiration

pepro-ultimate-invoice/pepro-ultimate-invoice.php 92% from 13 tests

The main file in "PeproDev Ultimate Invoice" v. 1.9.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 208 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin113,055 lines of code in 673 files:
LanguageFilesBlank linesComment linesLines of code
PHP52713,66319,24191,596
CSS342,96821010,924
JavaScript222651943,051
Markdown2495512,436
PO File16007041,812
SVG32401,553
JSON13301,156
YAML10604231
HTML500195
XML410098
Bourne Shell1203

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity has to be reduced 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.50
Average class complexity45.53
▷ Minimum class complexity1.00
▷ Maximum class complexity7,024.00
Average method complexity9.51
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces61
Interfaces24
Traits6
Classes406
▷ Abstract classes184.43%
▷ Concrete classes38895.57%
▷ Final classes153.87%
Methods2,449
▷ Static methods1646.70%
▷ Public methods2,17588.81%
▷ Protected methods1124.57%
▷ Private methods1626.61%
Functions73
▷ Named functions2534.25%
▷ Anonymous functions4865.75%
Constants486
▷ Global constants102.06%
▷ Class constants47697.94%
▷ Public constants47599.79%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 0.37MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/document.png0.23KB0.24KB0.00%
template/default/screenshot.png54.76KB27.61KB▼ 49.58%
assets/img/pepro-logo.png31.98KB12.83KB▼ 59.89%
assets/img/mail-account.png0.36KB0.48KB0.00%
assets/img/unpacking.png0.39KB0.52KB0.00%