78% facturare-persoana-fizica-sau-juridica

Code Review | Facturare WooCommerce

WordPress plugin Facturare WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: facturare-persoan...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 26, 2018
  • Latest release: Jul 15, 2023
  • Number of updates: 24
  • Update frequency: every 69.3 days
  • Top authors: giucu91 (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

2,000+ active /10,863 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
This plugin's installer ran successfully

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

Server-side resources used by Facturare WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3338.76 ▼2.96
Dashboard /wp-admin3.70 ▲0.3548.78 ▼12.76
Posts /wp-admin/edit.php3.75 ▲0.3954.90 ▲7.09
Add New Post /wp-admin/post-new.php6.22 ▲0.3394.50 ▼20.85
Media Library /wp-admin/upload.php3.56 ▲0.3239.85 ▲5.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
facturare-rate-time
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Facturare WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.071.60 ▼0.1540.27 ▼5.29
Dashboard /wp-admin2,206 ▲185.90 ▲0.09106.29 ▼7.7239.87 ▼7.61
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0539.74 ▲2.8036.45 ▲3.45
Add New Post /wp-admin/post-new.php1,538 ▲1923.03 ▼0.25622.04 ▼76.3259.48 ▼13.15
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0894.83 ▼0.3140.39 ▼1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • facturare-rate-time
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/facturare-persoana-fizica-sau-juridica/admin/views/contact-box.php
    • > /wp-content/plugins/facturare-persoana-fizica-sau-juridica/admin/views/feedback-box.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/facturare-persoana-fizica-sau-juridica/includes/compatibilities.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce, facturare, persoana fizica, persoana juridica

facturare-persoana-fizica-sau-juridica/facturare.php 85% from 13 tests

This is the main PHP file of "Facturare WooCommerce" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("facturare-persoana-fizica-sau-juridica.php" instead of "facturare.php")

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
Success! There were no dangerous files found in this plugin2,014 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP134251191,681
PO File2116230286
XML10027
JavaScript15020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity25.29
▷ Minimum class complexity3.00
▷ Maximum class complexity75.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods11.35%
▷ Public methods6790.54%
▷ Protected methods00.00%
▷ Private methods79.46%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin