73% woocommerce-twitterbootstrap

Code Review | WooCommerce Twitter's Bootstrap

WordPress plugin WooCommerce Twitter's Bootstrap scored 73% from 54 tests.

About plugin

  • Plugin page: woocommerce-twitt...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9
  • WordPress version: 5.8.1
  • First release: Aug 26, 2013
  • Latest release: Feb 10, 2014
  • Number of updates: 30
  • Update frequency: every 5.6 days
  • Top authors: bassjobsen (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 6,544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.06MB] [CPU: ▼207.01ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Twitter's Bootstrap
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.54 ▼0.3014.46 ▼16.63
Dashboard /wp-admin2.59 ▼0.4718.01 ▼31.71
Posts /wp-admin/edit.php2.59 ▼0.5217.14 ▼29.91
Add New Post /wp-admin/post-new.php2.59 ▼2.8516.50 ▼749.80
Media Library /wp-admin/upload.php2.59 ▼0.4116.81 ▼16.46
WooCommerce Bootstrap /wp-admin/options-general.php?page=woocommerce-twitterbootstrap2.5917.52

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Twitter's Bootstrap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲9015.99 ▲0.2810.98 ▼0.4648.71 ▲3.02
Dashboard /wp-admin2,965 ▲345.97 ▲0.06148.77 ▼7.08114.59 ▲11.90
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0068.29 ▼4.8589.54 ▼0.27
Add New Post /wp-admin/post-new.php1,503 ▼11218.56 ▼2.79413.02 ▲67.90108.19 ▼0.83
Media Library /wp-admin/upload.php1,812 ▲645.01 ▲0.01158.80 ▼4.08119.04 ▲11.51
WooCommerce Bootstrap /wp-admin/options-general.php?page=woocommerce-twitterbootstrap1,1392.0657.9474.40

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
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/woocommerce-twitterbootstrap/woocommerce-twitterbootstrap.php+117
    Function create_function() is deprecated

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=woocommerce-twitterbootstrap
    • > Deprecated in wp-content/plugins/woocommerce-twitterbootstrap/woocommerce-twitterbootstrap.php+117
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woocommerce-twitterbootstrap/templates/placeholder.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-twitterbootstrap/woocommerce-twitterbootstrap.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woocommerce-twitterbootstrap/templates/settings.php:3

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 require attention:
  • Screenshots: Please add an image for screenshot #1 (Settings panel of WooCommerce Twitter's Bootstrap)
Please take inspiration from this readme.txt

woocommerce-twitterbootstrap/woocommerce-twitterbootstrap.php Passed 13 tests

This is the main PHP file of "WooCommerce Twitter's Bootstrap" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Adds Twitter's Bootstrap's Grid to WooCommerce

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
Success! There were no dangerous files found in this plugin635 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5150213451
PO File3273990
LESS16163
CSS10131

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png20.05KB7.54KB▼ 62.37%
screenshot-1.png20.05KB7.54KB▼ 62.37%