67% wp-ever-accounting

Code Review | WP Ever Accounting - Accounting for small business

WordPress plugin WP Ever Accounting - Accounting for small business scored67%from 54 tests.

About plugin

  • Plugin page: wp-ever-accounting
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 25, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 42
  • Update frequency: every 34.6 days
  • Top authors: everaccounting (69.05%)manikmist09 (33.33%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /15,841 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.71MB] [CPU: ▲4.75ms] 75% from 4 tests

Analyzing server-side resources used by WP Ever Accounting - Accounting for small business
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 747.80ms on /wp-admin/admin.php?page=ea-extensions)
PageMemory (MB)CPU Time (ms)
Home /5.45 ▲1.9949.24 ▲10.13
Dashboard /wp-admin6.23 ▲2.9256.82 ▼1.59
Posts /wp-admin/edit.php6.33 ▲2.9760.86 ▲16.18
Add New Post /wp-admin/post-new.php8.94 ▲3.0588.75 ▼5.73
Media Library /wp-admin/upload.php6.18 ▲2.9554.80 ▲23.62
Expenses /wp-admin/admin.php?page=ea-expenses6.8962.36
Reports /wp-admin/admin.php?page=ea-reports7.1480.63
Tools /wp-admin/admin.php?page=ea-tools6.8955.26
Settings /wp-admin/admin.php?page=ea-settings6.9988.60
Banking /wp-admin/admin.php?page=ea-banking7.2160.79
Overview /wp-admin/admin.php?page=eaccounting7.1376.30
Sales /wp-admin/admin.php?page=ea-sales6.8958.60
Items /wp-admin/admin.php?page=ea-items6.8954.12
Extensions /wp-admin/admin.php?page=ea-extensions6.89747.80

Server storage [IO: ▲2.51MB] [DB: ▲0.13MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 321 new files
Database: 10 new tables, 11 new options
New tables
wp_ea_contactmeta
wp_ea_accounts
wp_ea_items
wp_ea_transactions
wp_ea_notes
wp_ea_transfers
wp_ea_contacts
wp_ea_document_items
wp_ea_categories
wp_ea_documents
New WordPress options
eaccounting_install_date
eaccounting_currencies
widget_recent-comments
can_compress_scripts
db_upgraded
eaccounting_version
eaccounting_notices
eaccounting_settings
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Ever Accounting - Accounting for small business
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9214.68 ▲0.331.64 ▼0.0638.45 ▼7.04
Dashboard /wp-admin2,262 ▲855.67 ▲0.0995.36 ▼8.8942.52 ▼4.10
Posts /wp-admin/edit.php2,164 ▲612.02 ▲0.0640.68 ▲2.0637.04 ▲3.10
Add New Post /wp-admin/post-new.php1,566 ▲3623.25 ▲0.15677.29 ▲20.9852.52 ▼1.22
Media Library /wp-admin/upload.php1,464 ▲674.20 ▼0.0096.10 ▼3.2542.01 ▲0.35
Expenses /wp-admin/admin.php?page=ea-expenses1,6865.1085.0537.23
Reports /wp-admin/admin.php?page=ea-reports1,6665.20153.5533.26
Tools /wp-admin/admin.php?page=ea-tools3,4244.4863.0933.59
Settings /wp-admin/admin.php?page=ea-settings2,8095.0082.0441.95
Banking /wp-admin/admin.php?page=ea-banking1,4984.4356.9479.64
Overview /wp-admin/admin.php?page=eaccounting1,3825.91137.6350.67
Sales /wp-admin/admin.php?page=ea-sales1,6915.0974.3126.89
Items /wp-admin/admin.php?page=ea-items1,3794.2960.5131.39
Extensions /wp-admin/admin.php?page=ea-extensions1,2654.4052.66110.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 10 tables in the database
    • wp_ea_notes
    • wp_ea_documents
    • wp_ea_document_items
    • wp_ea_transactions
    • wp_ea_contactmeta
    • wp_ea_accounts
    • wp_ea_items
    • wp_ea_contacts
    • wp_ea_categories
    • wp_ea_transfers
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • eaccounting_currencies
    • widget_recent-posts
    • eaccounting_install_date
    • eaccounting_notices
    • eaccounting_settings
    • theysaidso_admin_options
    • eaccounting_version
    • ...

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)
Good news, no errors were detected

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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-ever-accounting/templates/restricted.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_html_class() in wp-content/plugins/wp-ever-accounting/templates/bill-actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function eaccounting_get_countries() in wp-content/plugins/wp-ever-accounting/templates/invoice/invoice-to.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function eaccounting_get_countries() in wp-content/plugins/wp-ever-accounting/templates/bill/bill-from.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_html_class() in wp-content/plugins/wp-ever-accounting/templates/invoice-actions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #19 (Cash flow Report), #20 (Settings)
You can look at the official readme.txt

wp-ever-accounting/wp-ever-accounting.php 92% from 13 tests

The principal PHP file in "WP Ever Accounting - Accounting for small business" v. 1.1.7 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "4.7.0")

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
Good job! No executable or dangerous file extensions detected32,588 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
PHP2495,21916,51832,551
JavaScript180018
CSS100010
JSON1005
SVG4004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.06
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces13
Interfaces4
Traits3
Classes109
▷ Abstract classes1412.84%
▷ Concrete classes9587.16%
▷ Final classes11.05%
Methods1,343
▷ Static methods1329.83%
▷ Public methods1,16686.82%
▷ Protected methods16111.99%
▷ Private methods161.19%
Functions220
▷ Named functions20392.27%
▷ Anonymous functions177.73%
Constants31
▷ Global constants929.03%
▷ Class constants2270.97%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 compressed PNG files occupy 0.29MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/ui-bg_glass_75_e6e6e6_1x400.png0.09KB0.14KB0.00%
dist/images/ui-bg_flat_75_ffffff_40x100.png0.07KB0.08KB0.00%
dist/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
dist/images/ui-icons_454545_256x240.png3.69KB4.18KB0.00%
dist/images/dashboard.png33.31KB16.33KB▼ 50.98%