89% balance-of-freee-account

Code Review | Balance of freee account

WordPress plugin Balance of freee account scored 89% from 54 tests.

About plugin

  • Plugin page: balance-of-freee-...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.6
  • WordPress version: 5.8.1
  • First release: Jul 19, 2018
  • Latest release: Jul 19, 2018
  • Number of updates: 27
  • Update frequency: every 0.0 days
  • Top authors: Ippei Sumida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 396 total downloads


Plugin footprint Passed 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: ▲0.05MB] [CPU: ▼144.39ms] Passed 4 tests

This is a short check of server-side resources used by Balance of freee account
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1640.69 ▲17.75
Dashboard /wp-admin3.11 ▲0.0645.33 ▼2.08
Posts /wp-admin/edit.php3.16 ▲0.0536.65 ▼7.05
Add New Post /wp-admin/post-new.php5.47 ▲0.0385.00 ▼567.28
Media Library /wp-admin/upload.php3.05 ▲0.0530.63 ▼1.13

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Balance of freee account
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,766 ▲17015.89 ▲0.267.67 ▼2.1648.62 ▲0.94
Dashboard /wp-admin3,059 ▲1225.90 ▼0.03143.24 ▲0.44133.77 ▲13.77
Posts /wp-admin/edit.php2,759 ▲202.69 ▲0.0062.57 ▼1.0387.45 ▼0.41
Add New Post /wp-admin/post-new.php1,513 ▼17018.58 ▼0.15378.64 ▲29.35108.82 ▼11.38
Media Library /wp-admin/upload.php1,827 ▲175.02 ▲0.01139.95 ▼13.97120.01 ▼0.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/balance-of-freee-account/lib/view/dashboard/not-available.php
    • > /wp-content/plugins/balance-of-freee-account/lib/view/admin/connect.php
    • > /wp-content/plugins/balance-of-freee-account/lib/view/dashboard/error.php
    • > /wp-content/plugins/balance-of-freee-account/lib/view/dashboard/view.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: link_url in wp-content/plugins/balance-of-freee-account/lib/view/admin/connect.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/balance-of-freee-account/balance-of-freee-account.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/balance-of-freee-account/lib/view/admin/form.php:28
    • > PHP Notice
      Undefined variable: setting_url in wp-content/plugins/balance-of-freee-account/lib/view/dashboard/not-available.php on line 9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/balance-of-freee-account/lib/view/dashboard/view.php on line 7
    • > PHP Notice
      Undefined variable: companies in wp-content/plugins/balance-of-freee-account/lib/view/dashboard/view.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: accounting, freee

balance-of-freee-account/balance-of-freee-account.php Passed 13 tests

This is the main PHP file of "Balance of freee account" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Show your balance of freee account on dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin334 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.33
▷ Minimum class complexity5.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2095.24%
▷ Protected methods14.76%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin