78% accounting-software-by-giddh

Code Review | Accounting Software Giddh

WordPress plugin Accounting Software Giddh scored78%from 54 tests.

About plugin

  • Plugin page: accounting-softwa...
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 5, 2021
  • Latest release: Aug 9, 2021
  • Number of updates: 7
  • Update frequency: every 18.6 days
  • Top authors: giddh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 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.01MB] [CPU: ▼8.10ms] Passed 4 tests

An overview of server-side resources used by Accounting Software Giddh
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.93 ▼2.37
Dashboard /wp-admin3.31 ▼0.0443.41 ▼19.38
Posts /wp-admin/edit.php3.36 ▲0.0045.03 ▼0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.68 ▼10.43
Media Library /wp-admin/upload.php3.23 ▲0.0032.09 ▲1.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 146 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accounting Software Giddh
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.221.84 ▲0.1241.57 ▲1.33
Dashboard /wp-admin2,206 ▲154.84 ▼1.10100.47 ▼6.9140.80 ▼0.76
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0035.39 ▼0.9830.52 ▼4.83
Add New Post /wp-admin/post-new.php1,519 ▲523.35 ▲5.85605.19 ▼116.0045.31 ▼8.18
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0599.86 ▼6.2942.89 ▲0.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/accounting-software-by-giddh/templates/faq.php
    • > /wp-content/plugins/accounting-software-by-giddh/includes/inventory/sku_matched.php
    • > /wp-content/plugins/accounting-software-by-giddh/includes/footer.php
    • > /wp-content/plugins/accounting-software-by-giddh/includes/inventory/unmatched_woocommerce.php
    • > /wp-content/plugins/accounting-software-by-giddh/giddh.php
    • > /wp-content/plugins/accounting-software-by-giddh/includes/inventory/unmatched_giddh.php
  • 49× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'GIDDH_PLUGIN_PATHincludes/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accounting-software-by-giddh/templates/setup.php on line 2
    • > PHP Warning
      include(GIDDH_PLUGIN_PATHincludes/inventory/unmatched_giddh.php): failed to open stream: No such file or directory in wp-content/plugins/accounting-software-by-giddh/includes/settings_inventory.php on line 18
    • > PHP Warning
      include(GIDDH_PLUGIN_PATHincludes/inventory/service_giddh.php): failed to open stream: No such file or directory in wp-content/plugins/accounting-software-by-giddh/includes/settings_inventory.php on line 21
    • > PHP Warning
      include(): Failed opening 'GIDDH_PLUGIN_PATHincludes/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accounting-software-by-giddh/templates/settings.php on line 2
    • > PHP Warning
      include(): Failed opening 'GIDDH_PLUGIN_PATHincludes/footer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accounting-software-by-giddh/templates/faq.php on line 115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/accounting-software-by-giddh/includes/settings_invoice.php:8
    • > PHP Warning
      Use of undefined constant GIDDH_PLUGIN_PATH - assumed 'GIDDH_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/accounting-software-by-giddh/templates/setup.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/accounting-software-by-giddh/templates/onboarding.php:9
    • > PHP Warning
      include(): Failed opening 'GIDDH_PLUGIN_PATHincludes/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accounting-software-by-giddh/templates/onboarding.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_script() in wp-content/plugins/accounting-software-by-giddh/templates/setup.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention: The official readme.txt is a good inspiration

accounting-software-by-giddh/giddh.php 92% from 13 tests

This is the main PHP file of "Accounting Software Giddh" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accounting-software-by-giddh.php" instead of "giddh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin9,406 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP38542554,256
SVG22013,043
CSS62132940
JavaScript611024835
HTML6284332

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.50
▷ Minimum class complexity3.00
▷ Maximum class complexity55.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods88
▷ Static methods33.41%
▷ Public methods88100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions6395.45%
▷ Anonymous functions34.55%
Constants20
▷ Global constants20100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/cross.png0.65KB0.00KB▼ 100.00%
assets/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
assets/images/ui-icons_777620_256x240.png4.52KB4.18KB▼ 7.58%
assets/images/email/twitter.png0.75KB0.54KB▼ 28.74%
assets/images/email/apple.png0.65KB0.50KB▼ 23.23%