78% ucto-invoices

Code Review | Účto+ Invoices

WordPress plugin Účto+ Invoices scored78%from 54 tests.

About plugin

  • Plugin page: ucto-invoices
  • Plugin version: 1.2.4
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 8
  • Update frequency: every 128.8 days
  • Top authors: uctoplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.16ms] Passed 4 tests

A check of server-side resources used by Účto+ Invoices
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2344.33 ▲4.49
Dashboard /wp-admin3.55 ▲0.2444.98 ▼5.28
Posts /wp-admin/edit.php3.66 ▲0.3047.67 ▲1.72
Add New Post /wp-admin/post-new.php6.15 ▲0.2695.16 ▲0.99
Media Library /wp-admin/upload.php3.47 ▲0.2437.57 ▲1.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
uctoplus_options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Účto+ Invoices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8014.32 ▼0.081.67 ▼0.0643.41 ▼0.65
Dashboard /wp-admin2,226 ▲465.58 ▼0.0190.17 ▼4.6368.07 ▲25.45
Posts /wp-admin/edit.php2,140 ▲401.99 ▲0.0338.65 ▲1.8934.24 ▲0.81
Add New Post /wp-admin/post-new.php1,584 ▲5825.08 ▲1.29710.11 ▲6.5069.23 ▲4.10
Media Library /wp-admin/upload.php1,428 ▲284.12 ▼0.0999.93 ▼5.4474.71 ▲27.54

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • uctoplus_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ucto-invoices/uctoplus-invoices.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'BaseUctoplusAPI' not found in wp-content/plugins/ucto-invoices/classes/UctoplusDials.php:9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ucto-invoices/classes/class.uctoplusInvoicesProcess.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'BaseUctoplusAPI' not found in wp-content/plugins/ucto-invoices/classes/UctoplusInvoice.php:9
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/ucto-invoices/classes/class.uctoplusInvoicesProcess.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ucto-invoices/classes/class.uctoplusInvoicesProcess.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 require attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

ucto-invoices/uctoplus-invoices.php 85% from 13 tests

Analyzing the main PHP file in "Účto+ Invoices" version 1.2.4
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ucto-invoices.php" instead of "uctoplus-invoices.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 264 characters long)

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
There were no executable files found in this plugin1,868 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP72161351,260
CSS2660391
PO File162124163
SVG50239
JavaScript13015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity26.86
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods70
▷ Static methods11.43%
▷ Public methods5882.86%
▷ Protected methods34.29%
▷ Private methods912.86%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin