68% solutions-invoice-manager

Code Review | Solutions Invoice Manager

WordPress plugin Solutions Invoice Manager scored68%from 54 tests.

About plugin

  • Plugin page: solutions-invoice...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jan 23, 2016
  • Latest release: Jul 1, 2017
  • Number of updates: 43
  • Update frequency: every 12.2 days
  • Top authors: solutionsbysteve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,096 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼12.47ms] Passed 4 tests

This is a short check of server-side resources used by Solutions Invoice Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2240.55 ▲1.04
Dashboard /wp-admin3.71 ▲0.3643.57 ▼20.99
Posts /wp-admin/edit.php3.67 ▲0.3238.12 ▼10.11
Add New Post /wp-admin/post-new.php6.33 ▲0.4588.11 ▼19.83
Media Library /wp-admin/upload.php3.63 ▲0.4040.01 ▲5.42
Invoices /wp-admin/edit.php?post_type=sim-invoice3.7040.06
Send Email /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-sendemail3.7733.96
Clients /wp-admin/edit-tags.php?taxonomy=sim-client&post_type=sim-invoice3.8234.97
Reports /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-reports3.8433.14
Payees /wp-admin/edit-tags.php?taxonomy=sim-payee&post_type=sim-invoice3.6534.63
How To Use /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-howto3.6431.93
Options /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-options3.6436.47
Logs /wp-admin/edit.php?post_type=sim-invoice-logs3.6939.50

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 445 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
sim-invoice-options
widget_theysaidso_widget
sim_invoice_templates
sim_invoice_need_flush
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Solutions Invoice Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22913.41 ▼0.948.43 ▲6.8741.87 ▲0.65
Dashboard /wp-admin2,267 ▲875.67 ▲0.0895.24 ▼1.9441.46 ▼1.96
Posts /wp-admin/edit.php2,155 ▲552.06 ▲0.0341.77 ▼2.0835.67 ▼3.57
Add New Post /wp-admin/post-new.php1,586 ▲6023.74 ▲0.22693.56 ▲94.6537.68 ▼14.73
Media Library /wp-admin/upload.php1,478 ▲784.31 ▲0.1297.53 ▼1.5144.38 ▼0.31
Invoices /wp-admin/edit.php?post_type=sim-invoice1,2221.9833.0731.31
Send Email /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-sendemail8702.1925.9228.26
Clients /wp-admin/edit-tags.php?taxonomy=sim-client&post_type=sim-invoice1,3602.2131.0033.54
Reports /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-reports9172.0624.7827.94
Payees /wp-admin/edit-tags.php?taxonomy=sim-payee&post_type=sim-invoice1,3392.2130.3530.44
How To Use /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-howto9382.1924.7727.24
Options /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-options9472.0626.1428.78
Logs /wp-admin/edit.php?post_type=sim-invoice-logs1,2021.9833.9127.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/solutions-invoice-manager/includes/class-solutions-invoice-manager-deactivator.php+43
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 7 options
    • sim-invoice-options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-reports
    • > Warning in wp-content/plugins/solutions-invoice-manager/admin/partials/solutions-invoice-manager-admin-display-reports.php+200
    ksort() expects parameter 1 to be array, null given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-reports
    • > Warning in wp-content/plugins/solutions-invoice-manager/admin/partials/solutions-invoice-manager-admin-display-reports.php+84
    Invalid argument supplied for foreach()
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sim-invoice&page=solutions-invoice-manager-reports
    • > Deprecated in wp-content/plugins/solutions-invoice-manager/admin/partials/solutions-invoice-manager-admin-display-reports.php+297
    Function money_format() is deprecated

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
  • 59× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/solutions-invoice-manager/admin/partials/solutions-invoice-manager-admin-display-reports.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/solutions-invoice-manager/admin/partials/solutions-invoice-manager-admin-display-options.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/solutions-invoice-manager/includes/CMB2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Cmb2Grid\\Grid\\Column' not found in wp-content/plugins/solutions-invoice-manager/includes/CMB2-grid/Grid/Group/GroupColumn.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: services, invoice, ecommerce

solutions-invoice-manager/solutions-invoice-manager.php 92% from 13 tests

The principal PHP file in "Solutions Invoice Manager" v. 1.2.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Git Repository: There should be no Git repositories present in your plugin

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
Success! There were no dangerous files found in this plugin102,124 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
XML35447,760
PO File12013,78217,88231,544
PHP1073,1726,95413,844
CSS161,1151,1595,455
Sass14267251,265
JavaScript72763541,140
Markdown72510717
YAML31833184
JSON400129
Bourne Shell1221186

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.28
▷ Minimum class complexity1.00
▷ Maximum class complexity338.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes97
▷ Abstract classes1111.34%
▷ Concrete classes8688.66%
▷ Final classes00.00%
Methods913
▷ Static methods818.87%
▷ Public methods75682.80%
▷ Protected methods14515.88%
▷ Private methods121.31%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants853.33%
▷ Class constants746.67%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/CMB2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
includes/CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
includes/CMB2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
includes/CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%