83% nari-accountant

Code Review | Nari Accountant

WordPress plugin Nari Accountant scored83%from 54 tests.

About plugin

  • Plugin page: nari-accountant
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 7, 2015
  • Latest release: Jun 18, 2016
  • Number of updates: 37
  • Update frequency: every 5.3 days
  • Top authors: shakhi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /3,959 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.26MB] [CPU: ▼1.11ms] Passed 4 tests

An overview of server-side resources used by Nari Accountant
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2846.80 ▲3.68
Dashboard /wp-admin3.58 ▲0.2352.95 ▼7.94
Posts /wp-admin/edit.php3.69 ▲0.3353.80 ▲4.40
Add New Post /wp-admin/post-new.php6.16 ▲0.27101.57 ▼4.57
Media Library /wp-admin/upload.php3.50 ▲0.2742.86 ▲7.59
Transactions /wp-admin/admin.php?page=nari100_transactions3.5039.80
Settings /wp-admin/admin.php?page=nari100_settings3.4837.60
Definitions /wp-admin/admin.php?page=nari100_definitions3.4840.12
Reports /wp-admin/admin.php?page=nari100_reports3.4840.63
Accounts /wp-admin/admin.php?page=nari100_accounts3.4832.65
Nari Accountant /wp-admin/admin.php?page=nari1003.4636.87

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 72 new files
Database: 3 new tables, 13 new options
New tables
wp_nari100_accounts
wp_nari100_transactions
wp_nari100_definitions
New WordPress options
nari100_bal_limit
nari100_currency
widget_recent-posts
nari100_thousands_sep
widget_recent-comments
nari100_backups
nari100_pages
nari100_version
db_upgraded
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Nari Accountant
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.73 ▲0.331.80 ▲0.1643.78 ▲1.57
Dashboard /wp-admin2,220 ▲405.59 ▼0.0587.69 ▼2.4682.66 ▲40.06
Posts /wp-admin/edit.php2,143 ▲432.02 ▲0.0234.48 ▼0.9833.63 ▼1.09
Add New Post /wp-admin/post-new.php1,564 ▲2823.30 ▲0.28674.37 ▲22.6150.39 ▼10.85
Media Library /wp-admin/upload.php1,440 ▲374.26 ▲0.0599.06 ▼0.9573.40 ▲27.57
Transactions /wp-admin/admin.php?page=nari100_transactions1,2542.6744.7384.29
Settings /wp-admin/admin.php?page=nari100_settings9922.4336.5938.08
Definitions /wp-admin/admin.php?page=nari100_definitions1,0772.4630.2041.07
Reports /wp-admin/admin.php?page=nari100_reports8592.4431.1629.78
Accounts /wp-admin/admin.php?page=nari100_accounts9692.4329.2431.01
Nari Accountant /wp-admin/admin.php?page=nari1008912.0124.8027.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 37× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nari-accountant/includes/templates/alert.php:7
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/nari-accountant/includes/templates/accounts/addfrm.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nari-accountant/includes/templates/settings/backup.php:4
    • > PHP Notice
      Trying to get property 'current' of non-object in wp-content/plugins/nari-accountant/includes/templates/navigation.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nari-accountant/includes/upgrade.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/nari-accountant/nari-accountant.php on line 20
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/nari-accountant/includes/templates/transactions/addfrm.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nari-accountant/includes/templates/pages.php:2
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/nari-accountant/includes/templates/definitions/addfrm.php on line 3
    • > PHP Notice
      Undefined variable: pagination in wp-content/plugins/nari-accountant/includes/templates/navigation.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Requires at least: Invalid version format
  • Screenshots: These screenshots do not have images: #1 (Admin Panel - Accounts Balance), #2 (Admin Panel - Defining System Categories), #3 (Admin Panel - Adding Expense), #4 (Admin Panel - List Of Transactions), #5 (Admin Panel - Access Menu)
The official readme.txt might help

nari-accountant/nari-accountant.php 85% from 13 tests

The principal PHP file in "Nari Accountant" v. 1.0.12 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected16,355 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,00876910,851
PHP263234392,332
CSS792341,319
SVG200943
PO File4411582910

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity33.29
▷ Minimum class complexity5.00
▷ Maximum class complexity97.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods54
▷ Static methods2648.15%
▷ Public methods5398.15%
▷ Protected methods00.00%
▷ Private methods11.85%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/money20 (1).png1.07KB0.56KB▼ 47.77%
assets/images/bg.png2.77KB2.87KB0.00%
assets/images/money20 (3).png5.07KB1.59KB▼ 68.52%
screenshot-5.png11.42KB5.06KB▼ 55.69%
screenshot-1.png29.99KB15.45KB▼ 48.49%