10% management-companie

Code Review | Facturare.Online

WordPress plugin Facturare.Online scored10%from 54 tests.

About plugin

  • Plugin page: management-companie
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.9.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 2, 2018
  • Latest release: Nov 1, 2023
  • Number of updates: 70
  • Update frequency: every 26.1 days
  • Top authors: itcreative (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,683 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/management-companie/Inc/Core/Activator.php+37
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.47ms] Passed 4 tests

An overview of server-side resources used by Facturare.Online
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.50 ▼5.23
Dashboard /wp-admin3.31 ▼0.0446.01 ▼14.64
Posts /wp-admin/edit.php3.36 ▲0.0049.22 ▼0.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.64 ▲3.56
Media Library /wp-admin/upload.php3.23 ▲0.0035.92 ▼1.40

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Facturare.Online: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.74 ▲0.391.63 ▼0.1039.36 ▼4.83
Dashboard /wp-admin2,195 ▲185.63 ▼0.0183.36 ▼7.6338.87 ▼4.29
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0438.14 ▼0.4335.79 ▼1.19
Add New Post /wp-admin/post-new.php1,526 ▼223.63 ▲0.69662.37 ▼66.5062.85 ▲10.48
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.00115.24 ▲14.9353.94 ▲10.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 42× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Constraints\\BaseConstraint' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Constraints/Constraint.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/management-companie/Inc/Libraries/sylouuu/Curl/Method/Delete.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Constraints\\Constraint' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Constraints/SchemaConstraint.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Exception/ValidationException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Uri\\Retrievers\\AbstractRetriever' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Uri/Retrievers/Curl.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/management-companie/Inc/Libraries/sylouuu/Curl/Method/Get.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Exception/InvalidSchemaMediaTypeException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Constraints\\TypeCheck\\TypeCheckInterface' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'FacturareOnline\\Inc\\Libraries\\JsonSchema\\Exception\\ExceptionInterface' not found in wp-content/plugins/management-companie/Inc/Libraries/JsonSchema/Exception/RuntimeException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Utilities\\OrderUtil' not found in wp-content/plugins/management-companie/Inc/Admin/views/html-managementcompanie-admin-display.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ecommerce, facturareonline, invoice

management-companie/managementcompanie.php 85% from 13 tests

"Facturare.Online" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.1" instead of "6.9.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("management-companie.php" instead of "managementcompanie.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin11,853 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP742,1136,51011,154
JavaScript2239439
PO File185127196
CSS211863
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.90
▷ Minimum class complexity1.00
▷ Maximum class complexity401.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces16
Interfaces7
Traits0
Classes62
▷ Abstract classes46.45%
▷ Concrete classes5893.55%
▷ Final classes00.00%
Methods484
▷ Static methods449.09%
▷ Public methods42387.40%
▷ Protected methods367.44%
▷ Private methods255.17%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants84
▷ Global constants1922.62%
▷ Class constants6577.38%
▷ Public constants65100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png0.37KB0.36KB▼ 1.60%