89% order-barcode-for-woocommerce

Code Review | Order Barcode Plugin

WordPress plugin Order Barcode Plugin scored89%from 54 tests.

About plugin

  • Plugin page: order-barcode-for...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.8
  • WordPress version: 6.3.1
  • First release: Oct 16, 2020
  • Latest release: Jul 21, 2021
  • Number of updates: 15
  • Update frequency: every 18.5 days
  • Top authors: mascotdevelopers (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Order Barcode Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.60 ▲8.41
Dashboard /wp-admin3.32 ▲0.0245.31 ▼2.86
Posts /wp-admin/edit.php3.37 ▲0.0145.72 ▼2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.89 ▼0.05
Media Library /wp-admin/upload.php3.24 ▲0.0135.01 ▲0.27

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Order Barcode Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17813.64 ▼0.726.76 ▲4.7639.31 ▼10.52
Dashboard /wp-admin2,205 ▲175.81 ▲0.9396.75 ▼14.3839.66 ▼4.28
Posts /wp-admin/edit.php2,088 ▼12.17 ▲0.1434.53 ▼0.7632.75 ▼4.38
Add New Post /wp-admin/post-new.php1,531 ▼1622.82 ▼0.43583.08 ▼92.2860.89 ▲5.98
Media Library /wp-admin/upload.php1,393 ▲54.24 ▼0.0294.51 ▼4.5441.60 ▼1.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive 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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt might help

order-barcode-for-woocommerce/order-barcode.php 85% from 13 tests

Analyzing the main PHP file in "Order Barcode Plugin" version 1.0.3
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("order-barcode-for-woocommerce.php" instead of "order-barcode.php")

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
There were no executable files found in this plugin230 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11510146
CSS21058
JavaScript13026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/empty.png2.48KB0.13KB▼ 94.57%