68% aistore-invoicing-software

Code Review | Aistore invoicing software

WordPress plugin Aistore invoicing software scored68%from 54 tests.

About plugin

  • Plugin page: aistore-invoicing...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 25, 2022
  • Latest release: Mar 21, 2022
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: susheelhbti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /288 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼6.48ms] Passed 4 tests

A check of server-side resources used by Aistore invoicing software
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.96 ▲0.08
Dashboard /wp-admin3.45 ▲0.1145.17 ▼14.19
Posts /wp-admin/edit.php3.57 ▲0.2144.88 ▲1.84
Add New Post /wp-admin/post-new.php6.03 ▲0.1578.00 ▼13.63
Media Library /wp-admin/upload.php3.38 ▲0.1536.15 ▲3.43

Server storage [IO: ▲10.31MB] [DB: ▲0.09MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 327 new files
Database: 14 new tables, 6 new options
New tables
wp_aistore_books_vendor_documents
wp_aistore_books_customer_documents
wp_aistore_books_invoice
wp_aistore_books_accounts
wp_aistore_books_vendor
wp_aistore_books_wallet_transactions
wp_aistore_books_notification
wp_aistore_books_bank
wp_aistore_books_estimate
wp_aistore_books_subaccounts
...
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Aistore invoicing software
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.56 ▼0.839.24 ▲7.5439.92 ▼0.95
Dashboard /wp-admin2,211 ▲305.50 ▼0.2488.89 ▼11.2077.33 ▲34.10
Posts /wp-admin/edit.php2,119 ▲191.97 ▲0.0134.89 ▲0.0729.94 ▼4.37
Add New Post /wp-admin/post-new.php1,569 ▲4018.40 ▼4.81650.44 ▼19.7054.32 ▲0.49
Media Library /wp-admin/upload.php1,419 ▲254.21 ▲0.0397.30 ▼1.3272.20 ▲28.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 14 tables
    • wp_aistore_books_accounts
    • wp_aistore_books_payment
    • wp_aistore_books_estimate
    • wp_aistore_books_bank
    • wp_aistore_books_wallet_transactions
    • wp_aistore_books_currency
    • wp_aistore_books_customer
    • wp_aistore_books_invoice
    • wp_aistore_books_notification
    • wp_aistore_books_customer_documents
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/aistore-invoicing-software/aistore_report/aistore_books_report.php
    • > /wp-content/plugins/aistore-invoicing-software/aistore_report/aistore_books_bank_transactions.php
    • > /wp-content/plugins/aistore-invoicing-software/aistore_lib/aistore_booka_notification.php
    • > /wp-content/plugins/aistore-invoicing-software/aistore_report/aistore_books_list_company.php
  • 127× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/aistore-invoicing-software/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/aistore-invoicing-software/vendor/dompdf/dompdf/src/FrameReflower/Page.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/aistore-invoicing-software/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/aistore-invoicing-software/vendor/dompdf/dompdf/src/FrameReflower/TableRowGroup.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/aistore-invoicing-software/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/aistore-invoicing-software/vendor/phenx/php-font-lib/src/FontLib/Table/Type/head.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/aistore-invoicing-software/vendor/sabberworm/php-css-parser/src/Property/Import.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\Value' not found in wp-content/plugins/aistore-invoicing-software/vendor/sabberworm/php-css-parser/src/Value/ValueList.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\AbstractRenderer' not found in wp-content/plugins/aistore-invoicing-software/vendor/dompdf/dompdf/src/Renderer.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/aistore-invoicing-software/vendor/dompdf/dompdf/src/Adapter/GD.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
1 plugin tags: invoicing

aistore-invoicing-software/index.php 92% from 13 tests

The principal PHP file in "Aistore invoicing software" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aistore-invoicing-software.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin45,706 lines of code in 256 files:
LanguageFilesBlank linesComment linesLines of code
PHP23511,49018,13243,758
Markdown72620969
JSON700440
CSS29244392
XML10286
YAML19035
HTML10017
SVG1008
JavaScript1061

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity38.22
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces33
Interfaces5
Traits0
Classes178
▷ Abstract classes126.74%
▷ Concrete classes16693.26%
▷ Final classes00.00%
Methods2,028
▷ Static methods1266.21%
▷ Public methods1,70884.22%
▷ Protected methods24412.03%
▷ Private methods763.75%
Functions85
▷ Named functions6778.82%
▷ Anonymous functions1821.18%
Constants206
▷ Global constants20.97%
▷ Class constants20499.03%
▷ Public constants204100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%