10% simple-barcode-generator

Code Review | Simple BarCode generator

WordPress plugin Simple BarCode generator scored10%from 54 tests.

About plugin

  • Plugin page: simple-barcode-ge...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 25, 2019
  • Latest release: Oct 25, 2019
  • Number of updates: 2
  • Update frequency: every 6.0 days
  • Top authors: tazhelico (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /708 total downloads

Benchmarks

Plugin footprint 40% 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
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/simple-barcode-generator/barcode.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; barcode has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼61.22ms] Passed 4 tests

This is a short check of server-side resources used by Simple BarCode generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.42 ▼42.66
Dashboard /wp-admin2.08 ▼1.275.65 ▼60.44
Posts /wp-admin/edit.php2.08 ▼1.287.17 ▼41.76
Add New Post /wp-admin/post-new.php2.08 ▼3.815.47 ▼100.03
Media Library /wp-admin/upload.php2.08 ▼1.156.20 ▼34.84

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_widget-barcode
can_compress_scripts

Browser metrics Passed 4 tests

Simple BarCode generator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.29 ▼0.011.74 ▼0.0642.04 ▼0.74
Dashboard /wp-admin2,195 ▲155.64 ▲0.0084.81 ▼10.8139.71 ▼0.89
Posts /wp-admin/edit.php2,103 ▲32.17 ▲0.1537.29 ▲0.5233.75 ▼2.41
Add New Post /wp-admin/post-new.php1,554 ▲2218.25 ▼4.91620.99 ▼76.4555.65 ▲1.20
Media Library /wp-admin/upload.php1,397 ▼64.16 ▼0.06119.35 ▲22.0553.83 ▲8.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-barcode-generator/barcode.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; barcode has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_widget-barcode
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-barcode-generator/barcode.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (screenshot-barcode.png)
You can take inspiration from this readme.txt

simple-barcode-generator/barcode.php 92% from 13 tests

The main PHP script in "Simple BarCode generator" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-barcode-generator.php" instead of "barcode.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
Everything looks great! No dangerous files found in this plugin68 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16765
JavaScript1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ISBN.png70.11KB25.27KB▼ 63.95%
images/screenshot-barcode.png37.66KB10.40KB▼ 72.38%