84% cbxwpsimpleaccounting

Code Review | CBX Accounting & Bookkeeping

WordPress plugin CBX Accounting & Bookkeeping scored84%from 54 tests.

About plugin

  • Plugin page: cbxwpsimpleaccoun...
  • Plugin version: 1.3.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Aug 15, 2020
  • Number of updates: 47
  • Update frequency: every 37.3 days
  • Top authors: manchumahara (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /17,388 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.01MB] [CPU: ▼11.12ms] Passed 4 tests

This is a short check of server-side resources used by CBX Accounting & Bookkeeping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.94 ▼9.80
Dashboard /wp-admin3.31 ▼0.0449.64 ▼16.47
Posts /wp-admin/edit.php3.36 ▲0.0050.57 ▼0.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.04 ▼15.65
Media Library /wp-admin/upload.php3.23 ▲0.0036.51 ▼2.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 433 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CBX Accounting & Bookkeeping
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.091.93 ▲0.0445.86 ▲1.58
Dashboard /wp-admin2,198 ▲215.58 ▼0.0492.20 ▼6.8941.50 ▼0.81
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0039.27 ▲0.3134.79 ▼0.32
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.25634.32 ▼51.1955.28 ▼0.21
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.10103.04 ▼15.0042.40 ▼6.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/cbxwpsimpleaccounting/includes/fpdf/exfpdf.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cbxwpsimpleaccounting/admin/partials/admin-addexpinc-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cbxwpsimpleaccounting/admin/partials/admin-overview-display.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-loglist.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-catlist.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-acclist.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-catlist.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/cbxwpsimpleaccounting/admin/partials/admin-viewexpinc-display.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-catlist.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/cbxwpsimpleaccounting/includes/class-cbxwpsimpleaccounting-loglist.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

cbxwpsimpleaccounting/cbxwpsimpleaccounting.php Passed 13 tests

The main file in "CBX Accounting & Bookkeeping" v. 1.3.14 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Accounting solution inside WordPress for SME businness

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin76,808 lines of code in 377 files:
LanguageFilesBlank linesComment linesLines of code
CSS471,92282632,654
JavaScript2655,1603,47324,142
PHP512,9152,96918,062
Sass814710809
SVG100543
JSON100435
LESS2191788
HTML202475

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity118.25
▷ Minimum class complexity1.00
▷ Maximum class complexity443.00
Average method complexity5.22
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods543
▷ Static methods499.02%
▷ Public methods41776.80%
▷ Protected methods9918.23%
▷ Private methods274.97%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants15
▷ Global constants746.67%
▷ Class constants853.33%
▷ Public constants8100.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
27 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/chosen/chosen-sprite.png0.53KB0.88KB0.00%
assets/vendor/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
assets/images/idea.png7.19KB1.96KB▼ 72.79%
assets/images/icon_move.png0.22KB0.22KB▼ 0.89%
assets/vendor/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%