84% belcoio

Code Review | Belco.io for Woocommerce

WordPress plugin Belco.io for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: belcoio
  • Plugin version: 0.9.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Feb 19, 2015
  • Latest release: Sep 1, 2022
  • Number of updates: 76
  • Update frequency: every 36.2 days
  • Top authors: belco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,843 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.53ms] Passed 4 tests

This is a short check of server-side resources used by Belco.io for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.83 ▼0.84
Dashboard /wp-admin3.36 ▲0.0644.44 ▼10.95
Posts /wp-admin/edit.php3.48 ▲0.1247.45 ▼0.72
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.52 ▼21.12
Media Library /wp-admin/upload.php3.29 ▲0.0535.07 ▼1.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Belco.io for Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.31 ▼1.091.84 ▲0.0844.00 ▼0.05
Dashboard /wp-admin2,226 ▲385.86 ▲0.01104.01 ▼3.2439.28 ▼1.91
Posts /wp-admin/edit.php2,108 ▲161.99 ▼0.0439.75 ▲0.0736.68 ▲1.75
Add New Post /wp-admin/post-new.php1,546 ▲2523.29 ▼0.02677.97 ▲39.0161.62 ▼1.25
Media Library /wp-admin/upload.php1,408 ▲234.17 ▼0.0896.56 ▼10.1043.70 ▼0.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/belcoio/templates/activate.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/belcoio/templates/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/belcoio/templates/notice.php:2

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)
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Customer card, instantly see all customer information when you receive or make a call.)
Please take inspiration from this readme.txt

belcoio/belco.php 92% from 13 tests

Analyzing the main PHP file in "Belco.io for Woocommerce" version 0.9.4
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("belcoio.php" instead of "belco.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected585 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.50
▷ Minimum class complexity4.00
▷ Maximum class complexity23.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
▷ Static methods410.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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.31MB with 0.22MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/1.png322.41KB97.14KB▼ 69.87%