67% boltron-e-commerce-merchant-reviews

Code Review | Boltron - Ecommerce Merchant Reviews

WordPress plugin Boltron - Ecommerce Merchant Reviews scored67%from 54 tests.

About plugin

  • Plugin page: boltron-e-commerc...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2018
  • Latest release: Jan 2, 2020
  • Number of updates: 19
  • Update frequency: every 25.3 days
  • Top authors: phanesco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /669 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.16MB] [CPU: ▼46.98ms] Passed 4 tests

This is a short check of server-side resources used by Boltron - Ecommerce Merchant Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.6414.22 ▼37.35
Dashboard /wp-admin2.89 ▼0.4616.24 ▼38.83
Posts /wp-admin/edit.php2.89 ▼0.5118.00 ▼36.21
Add New Post /wp-admin/post-new.php2.89 ▼3.0415.24 ▼75.51
Media Library /wp-admin/upload.php2.89 ▼0.3815.84 ▼18.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Boltron - Ecommerce Merchant Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.44 ▲0.091.62 ▼0.2042.07 ▼2.91
Dashboard /wp-admin2,214 ▲375.61 ▲0.0385.86 ▼16.3841.61 ▼5.94
Posts /wp-admin/edit.php2,119 ▲192.03 ▼0.0041.91 ▲7.0139.46 ▼0.07
Add New Post /wp-admin/post-new.php1,540 ▲1423.20 ▲0.08654.92 ▼42.6951.04 ▼5.03
Media Library /wp-admin/upload.php1,422 ▲224.19 ▲0.01100.38 ▼11.4344.15 ▼5.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/boltron-e-commerce-merchant-reviews/boltron.php+315
    Accessing static property Boltron\Boltron::$backend as non static
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/boltron-e-commerce-merchant-reviews/core/frontend.php
    • > /wp-content/plugins/boltron-e-commerce-merchant-reviews/core/backend.php
    • > /wp-content/plugins/boltron-e-commerce-merchant-reviews/boltron.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BTRN() in wp-content/plugins/boltron-e-commerce-merchant-reviews/templates/frontend/grade-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BTRN() in wp-content/plugins/boltron-e-commerce-merchant-reviews/templates/frontend/shortcode-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/boltron-e-commerce-merchant-reviews/templates/backend/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BTRN() in wp-content/plugins/boltron-e-commerce-merchant-reviews/templates/frontend/cs-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can take inspiration from this readme.txt

boltron-e-commerce-merchant-reviews/boltron.php 77% from 13 tests

The main PHP file in "Boltron - Ecommerce Merchant Reviews" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("boltron-e-commerce-merchant-reviews.php" instead of "boltron.php")
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,531 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP73432561,114
CSS2312202
JavaScript75920200
SVG20014
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity51.33
▷ Minimum class complexity3.00
▷ Maximum class complexity116.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods4090.91%
▷ Protected methods00.00%
▷ Private methods49.09%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.51KB0.61KB0.00%