90% custom-invoice-url-for-woo-by-digidopt

Code Review | Custom Invoice URL for WooCommerce by Digidopt

WordPress plugin Custom Invoice URL for WooCommerce by Digidopt scored90%from 54 tests.

About plugin

  • Plugin page: custom-invoice-ur...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2022
  • Latest release: Dec 31, 2022
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: digidopt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.43ms] Passed 4 tests

This is a short check of server-side resources used by Custom Invoice URL for WooCommerce by Digidopt
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.54 ▼2.72
Dashboard /wp-admin3.31 ▲0.0143.10 ▼11.46
Posts /wp-admin/edit.php3.36 ▲0.0048.03 ▼3.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.68 ▼8.43
Media Library /wp-admin/upload.php3.23 ▲0.0036.63 ▲1.56

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Invoice URL for WooCommerce by Digidopt
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.68 ▼0.691.65 ▼0.1238.40 ▼4.47
Dashboard /wp-admin2,206 ▲324.87 ▼0.99109.60 ▼10.2641.16 ▼4.47
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0238.90 ▲0.4535.28 ▲3.72
Add New Post /wp-admin/post-new.php1,543 ▲2418.37 ▼4.58624.66 ▼65.0160.05 ▼0.94
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0296.47 ▼9.4841.29 ▼5.38

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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 | 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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: custom, invoice, google drive, onedrive, woocommerce

custom-invoice-url-for-woo-by-digidopt/index.php 92% from 13 tests

The main PHP file in "Custom Invoice URL for WooCommerce by Digidopt" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-invoice-url-for-woo-by-digidopt.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13127167
Markdown1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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