89% purchase-order-woocommerce-addon

Code Review | Purchase Order WooCommerce Addon

WordPress plugin Purchase Order WooCommerce Addon scored89%from 54 tests.

About plugin

  • Plugin page: purchase-order-wo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 20, 2017
  • Latest release: Aug 20, 2017
  • Number of updates: 3
  • Update frequency: every 6.3 days
  • Top authors: nazrulhassanmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.59ms] Passed 4 tests

This is a short check of server-side resources used by Purchase Order WooCommerce Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.52 ▼6.64
Dashboard /wp-admin3.33 ▲0.0349.26 ▼0.18
Posts /wp-admin/edit.php3.38 ▲0.0353.47 ▲5.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.49 ▼6.20
Media Library /wp-admin/upload.php3.25 ▲0.0235.28 ▼5.32

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Purchase Order WooCommerce Addon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.261.71 ▼0.2544.24 ▲1.11
Dashboard /wp-admin2,195 ▲155.61 ▲0.0790.95 ▲0.2444.04 ▼0.47
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0141.67 ▲4.4936.03 ▲1.47
Add New Post /wp-admin/post-new.php1,548 ▲1318.12 ▼0.26606.87 ▼33.6779.39 ▲10.15
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.0898.88 ▼0.8450.25 ▲8.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive 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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Tested up to: Invalid version format
The official readme.txt is a good inspiration

purchase-order-woocommerce-addon/woo-purchase-order-addon.php 92% from 13 tests

Analyzing the main PHP file in "Purchase Order WooCommerce Addon" version 1.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("purchase-order-woocommerce-addon.php" instead of "woo-purchase-order-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected132 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14913132

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin