66% invoice-on-the-go

Code Review | Invoice On The Go

WordPress plugin Invoice On The Go scored 66% from 54 tests.

About plugin

  • Plugin page: invoice-on-the-go
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.6
  • WordPress version: 5.8.1
  • First release: May 25, 2018
  • Latest release: May 26, 2018
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼156.96ms] Passed 4 tests

This is a short check of server-side resources used by Invoice On The Go
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1836.71 ▲3.95
Dashboard /wp-admin3.14 ▲0.0850.22 ▼7.83
Posts /wp-admin/edit.php3.25 ▲0.1446.70 ▲2.28
Add New Post /wp-admin/post-new.php3.12 ▼2.3229.45 ▼626.23
Media Library /wp-admin/upload.php3.08 ▲0.0739.32 ▲4.45
Settings /wp-admin/admin.php?page=invoice-on-the-go/RednaoInvoiceOnTheGo.phpsettings3.1842.37
Invoices /wp-admin/admin.php?page=rednao_invoice_on_the_go3.1638.30
Services /wp-admin/admin.php?page=invoice-on-the-go/RednaoInvoiceOnTheGo.phpservices3.1848.86

Server storage [IO: ▲6.94MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,181 new files
Database: 7 new tables, no new options
New tables
wp_rniotg_settings
wp_rniotg_invoice_meta
wp_rniotg_payment
wp_rniotg_invoice_detail
wp_rniotg_delete_log
wp_rniotg_invoice
wp_rniotg_service

Browser metrics Passed 4 tests

This is an overview of browser requirements for Invoice On The Go
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,741 ▲16915.90 ▼0.079.45 ▲0.7250.63 ▼44.86
Dashboard /wp-admin2,998 ▲695.90 ▼0.03143.62 ▼67.46134.72 ▼4.70
Posts /wp-admin/edit.php2,778 ▲392.59 ▼0.1170.09 ▲1.7391.95 ▲0.53
Add New Post /wp-admin/post-new.php1,629 ▲3818.82 ▲0.06391.52 ▲5.35118.13 ▼2.60
Media Library /wp-admin/upload.php1,783 ▼245.03 ▲0.06146.54 ▼22.22143.51 ▲24.32
Settings /wp-admin/admin.php?page=invoice-on-the-go/RednaoInvoiceOnTheGo.phpsettings3,99718.58757.39113.04
Invoices /wp-admin/admin.php?page=rednao_invoice_on_the_go1,77422.51378.94101.77
Services /wp-admin/admin.php?page=invoice-on-the-go/RednaoInvoiceOnTheGo.phpservices1,13510.97373.93101.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 7 tables in the database
    • wp_rniotg_invoice_detail
    • wp_rniotg_invoice_meta
    • wp_rniotg_payment
    • wp_rniotg_invoice
    • wp_rniotg_settings
    • wp_rniotg_delete_log
    • wp_rniotg_service

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=rednao_invoice_on_the_go
    • > Notice in wp-content/plugins/invoice-on-the-go/pages/invoice.php+32
    Undefined index: invoice_id

SRP 0% 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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/invoice-on-the-go/pages/settings.php
    • > /wp-content/plugins/invoice-on-the-go/pages/invoice.php
    • > /wp-content/plugins/invoice-on-the-go/pages/services.php
  • 246× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'rniotg\\db\\repo\\core\\BaseRepo' not found in wp-content/plugins/invoice-on-the-go/db/repo/InvoiceDetailRepo.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/lib/Twig/Node/With.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/lib/Twig/Loader/String.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/invoice-on-the-go/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=invoice-on-the-go/RednaoInvoiceOnTheGo.phpservices
    • > Network (severe)
    wp-content/plugins/invoice-on-the-go/js/angular/dist/vendor.bundle.js?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
1 plugin tags: invoice

invoice-on-the-go/RednaoInvoiceOnTheGo.php 77% from 13 tests

The main file in "Invoice On The Go" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("invoice-on-the-go.php" instead of "RednaoInvoiceOnTheGo.php")
  • Domain Path: The domain path folder was not found ("/languages/")

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
Good job! No executable or dangerous file extensions detected132,175 lines of code in 864 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1522,83817,23381,202
PHP4884,8956,71120,001
JSON130015,197
CSS91,074177,306
TypeScript77603923,461
reStructuredText892,4182,1343,372
C1171186860
HTML20461461
SVG200194
YAML19144
XML14029
C/C++ Header171315
Markdown113014
Twig86014
m41215

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.01
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces31
Interfaces43
Traits0
Classes503
▷ Abstract classes163.18%
▷ Concrete classes48796.82%
▷ Final classes40.82%
Methods1,563
▷ Static methods543.45%
▷ Public methods1,38888.80%
▷ Protected methods1328.45%
▷ Private methods432.75%
Functions69
▷ Named functions6188.41%
▷ Anonymous functions811.59%
Constants51
▷ Global constants11.96%
▷ Class constants5098.04%
▷ Public constants50100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/menu_icon.png3.21KB0.52KB▼ 83.94%
js/lib/tn/plugins/help/img/logo.png12.90KB7.62KB▼ 40.95%
images/paypal.png5.17KB3.11KB▼ 39.92%