83% free-accountant

Code Review | Free Accountant

WordPress plugin Free Accountant scored83%from 54 tests.

About plugin

  • Plugin page: free-accountant
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2015
  • Latest release: Dec 12, 2015
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: Shaforostov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /860 total downloads

Benchmarks

Plugin footprint 82% 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.06MB] [CPU: ▼8.60ms] Passed 4 tests

This is a short check of server-side resources used by Free Accountant
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.01 ▼6.59
Dashboard /wp-admin3.37 ▲0.0649.80 ▼4.75
Posts /wp-admin/edit.php3.42 ▲0.0648.49 ▼12.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.91 ▼10.21
Media Library /wp-admin/upload.php3.29 ▲0.0637.71 ▲0.78

Server storage [IO: ▲0.78MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Illegal file modification found: 2 files (43.02KB) outside of "wp-content/plugins/free-accountant/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
    • (new file) wp-content/themes/twentytwentyone/template_FA.php
Filesystem: 16 new files
Database: 13 new tables, 6 new options
New tables
wp_fa_Mat
wp_fa_Tax
wp_fa_bDoc
wp_fa_Contr
wp_fa_Doc
wp_fa_Sotr
wp_fa_Cram
wp_fa_Common
wp_fa_IDF
wp_fa_PlanSc
...
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Free Accountant: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.71 ▼0.871.74 ▼0.5940.92 ▼4.75
Dashboard /wp-admin2,221 ▲184.89 ▼0.96109.35 ▲3.6540.54 ▼3.25
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0240.81 ▲0.6435.10 ▼7.61
Add New Post /wp-admin/post-new.php1,545 ▼023.27 ▲0.03660.23 ▲52.1256.56 ▲3.05
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0299.96 ▼12.5544.15 ▲0.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/free-accountant/template_FA.php:35
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-accountant/template_FA.php on line 23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-accountant/template_FA.php on line 19
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-accountant/template_FA.php on line 18
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-accountant/template_FA.php on line 22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/free-accountant/template_FA.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === free-accountant === )
You can look at the official readme.txt

free-accountant/FA_WP.php 92% from 13 tests

The main file in "Free Accountant" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("free-accountant.php" instead of "FA_WP.php")

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
Good job! No executable or dangerous file extensions detected1,538 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11352659
PHP24438624
SVG707166
CSS13189

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bel.png0.73KB0.77KB0.00%
Del.png0.73KB0.77KB0.00%
add.png0.74KB0.90KB0.00%