84% b1-accounting

Code Review | B1.lt

WordPress plugin B1.lt scored84%from 54 tests.

About plugin

  • Plugin page: b1-accounting
  • Plugin version: 2.2.51
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-6.0.3
  • WordPress version: 6.3.1
  • First release: May 22, 2017
  • Latest release: Aug 2, 2023
  • Number of updates: 156
  • Update frequency: every 14.5 days
  • Top authors: b1accounting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.48ms] Passed 4 tests

This is a short check of server-side resources used by B1.lt
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.67 ▲2.15
Dashboard /wp-admin3.45 ▲0.1147.55 ▼11.48
Posts /wp-admin/edit.php3.50 ▲0.1545.83 ▲0.63
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.89 ▼5.07
Media Library /wp-admin/upload.php3.31 ▲0.0834.89 ▲2.02
B1.lt /wp-admin/admin.php?page=b1-accounting3.4632.71

Server storage [IO: ▲1.77MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: 2 new tables, 8 new options
New tables
wp_b1_validation_logs
wp_b1_logs
New WordPress options
b1_database_version
can_compress_scripts
db_upgraded
widget_recent-posts
b1-accounting
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by B1.lt
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▼0.011.74 ▼0.1639.62 ▼4.92
Dashboard /wp-admin2,206 ▲244.88 ▼0.93108.91 ▼2.8140.97 ▼2.15
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0338.55 ▼3.3734.14 ▼3.25
Add New Post /wp-admin/post-new.php1,542 ▲918.17 ▼4.96593.12 ▼76.7772.35 ▲18.93
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0292.54 ▼15.1539.99 ▼2.76
B1.lt /wp-admin/admin.php?page=b1-accounting2,0532.1632.0977.71

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 detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • b1_database_version
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'B1_Accounting_Base' not found in wp-content/plugins/b1-accounting/admin/class-b1-accounting-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/b1-accounting/includes/class-b1-accounting-deactivator.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/b1-accounting/includes/class-b1-accounting-validation-logger.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'B1_Accounting_Base' not found in wp-content/plugins/b1-accounting/includes/class-b1-accounting-manager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'B1_Accounting' not found in wp-content/plugins/b1-accounting/includes/class-b1-accounting-activator.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/b1-accounting/includes/class-b1-accounting-logger.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: Please take inspiration from this readme.txt

b1-accounting/b1-accounting.php Passed 13 tests

The main PHP script in "B1.lt" version 2.2.51 is automatically included on every request by WordPress
22 characters long description:
Integration with B1.lt

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,894 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP274324053,325
JavaScript12717308
PO File191124200
CSS16035
Markdown111026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods144
▷ Static methods4833.33%
▷ Public methods13090.28%
▷ Protected methods00.00%
▷ Private methods149.72%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants17.69%
▷ Class constants1292.31%
▷ Public constants12100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.57MB with 1.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png3.24KB1.64KB▼ 49.55%
assets/banner-1544x500.png334.60KB108.80KB▼ 67.48%
assets/screenshot-1.png233.66KB69.75KB▼ 70.15%
assets/screenshot-2.png944.72KB300.07KB▼ 68.24%
assets/banner-772x250.png88.95KB30.99KB▼ 65.16%