90% lh-woocommerce-invoicing

Code Review | LH Woocommerce Invoicing

WordPress plugin LH Woocommerce Invoicing scored90%from 54 tests.

About plugin

  • Plugin page: lh-woocommerce-in...
  • Plugin version: 1.03
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: Jul 31, 2022
  • Number of updates: 7
  • Update frequency: every 273.4 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.62ms] Passed 4 tests

Server-side resources used by LH Woocommerce Invoicing
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.07 ▲0.09
Dashboard /wp-admin3.34 ▲0.0344.23 ▼4.77
Posts /wp-admin/edit.php3.39 ▲0.0347.22 ▼2.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.75 ▼14.80
Media Library /wp-admin/upload.php3.26 ▲0.0337.18 ▲3.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for LH Woocommerce Invoicing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.321.70 ▲0.1843.78 ▲2.53
Dashboard /wp-admin2,203 ▲155.81 ▲0.8993.38 ▼19.8740.47 ▼0.17
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0036.06 ▼3.4031.57 ▲1.51
Add New Post /wp-admin/post-new.php1,538 ▲1823.39 ▲0.11606.46 ▼61.8548.70 ▼6.09
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0196.49 ▼6.0443.07 ▼5.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: invoicing, invoice, order, woocommerce, orders

lh-woocommerce-invoicing/lh-woocommerce-invoicing.php 92% from 13 tests

Analyzing the main PHP file in "LH Woocommerce Invoicing" version 1.03
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29522100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected