73% barcode-reception

Code Review | Barcode Reception

WordPress plugin Barcode Reception scored 73% from 54 tests.

About plugin

  • Plugin page: barcode-reception
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Jan 8, 2014
  • Latest release: Feb 20, 2014
  • Number of updates: 9
  • Update frequency: every 12.0 days
  • Top authors: hidaka.bizplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.76ms] Passed 4 tests

Analyzing server-side resources used by Barcode Reception
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.44 ▼1.80
Dashboard /wp-admin3.40 ▲0.1048.70 ▲0.14
Posts /wp-admin/edit.php3.51 ▲0.1645.56 ▲1.17
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.53 ▼8.63
Media Library /wp-admin/upload.php3.32 ▲0.0933.86 ▼0.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
barcode_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Barcode Reception
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲22514.17 ▼0.1912.23 ▲10.0242.24 ▼6.20
Dashboard /wp-admin2,230 ▲425.79 ▲0.89112.96 ▼1.9850.79 ▲1.04
Posts /wp-admin/edit.php2,113 ▲242.05 ▲0.0633.85 ▼0.3541.48 ▼1.04
Add New Post /wp-admin/post-new.php1,543 ▲923.29 ▲0.21594.68 ▼120.7245.80 ▼3.94
Media Library /wp-admin/upload.php1,412 ▲244.19 ▼0.0293.66 ▼6.6148.40 ▲4.69
Barcode 設定 /wp-admin/barcode_menu.php260.440.0714.64
受付済みユーザ一覧 /wp-admin/barcode_users.php260.440.075.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/barcode-reception/reception-view.php
    • > /wp-content/plugins/barcode-reception/barcode-view.php
    • > /wp-content/plugins/barcode-reception/entry-users-view.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Code128.php on line 44
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Driver.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Postnet.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/barcode-reception/barcode-reception.php:90
    • > PHP Fatal error
      Uncaught Error: Class 'BCR' not found in wp-content/plugins/barcode-reception/admin-view.php:11
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Upca.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Writer.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-reception/lib/Image/Barcode2.php on line 25
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Upce.php on line 25
    • > PHP Warning
      require_once(Image/Barcode2/Driver.php): failed to open stream: No such file or directory in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Ean13.php on line 25
    • > PHP Notice
      Trying to get property 'img_url' of non-object in wp-content/plugins/barcode-reception/barcode-view.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'Image/Barcode2/Driver.php' (include_path='.:/usr/share/php') in wp-content/plugins/barcode-reception/lib/Image/Barcode2/Driver/Int25.php on line 25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/barcode_menu.php
    • > Network (severe)
    wp-admin/barcode_menu.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/barcode_users.php
    • > Network (severe)
    wp-admin/barcode_users.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

barcode-reception/barcode-reception.php Passed 13 tests

The main PHP script in "Barcode Reception" version 0.4.0 is automatically included on every request by WordPress
75 characters long description:
WordPressをバーコード受付システムにするプラグインです

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,184 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP213711,1221,992
CSS336541,103
JavaScript17089

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.85
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods101
▷ Static methods76.93%
▷ Public methods8887.13%
▷ Protected methods00.00%
▷ Private methods1312.87%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/blitzer/images/ui-bg_flat_0_333333_40x100.png0.21KB0.08KB▼ 60.45%
lib/blitzer/images/ui-bg_flat_65_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
lib/blitzer/images/ui-bg_highlight-hard_100_eeeeee_1x100.png0.25KB0.14KB▼ 43.65%
lib/blitzer/images/ui-bg_highlight-soft_15_cc0000_1x100.png0.31KB0.18KB▼ 43.48%
lib/blitzer/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%