84% dw-shortcodes-bootstrap

Code Review | DW Shortcodes Bootstrap

WordPress plugin DW Shortcodes Bootstrap scored 84% from 54 tests.

About plugin

  • Plugin page: dw-shortcodes-boo...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 5.9.2
  • First release: Sep 24, 2012
  • Latest release: Aug 28, 2013
  • Number of updates: 19
  • Update frequency: every 17.9 days
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active / 19,875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼288.94ms] Passed 4 tests

Analyzing server-side resources used by DW Shortcodes Bootstrap
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1259.98 ▲7.24
Dashboard /wp-admin3.47 ▲0.0735.87 ▲3.94
Posts /wp-admin/edit.php3.70 ▲0.0641.49 ▲4.67
Add New Post /wp-admin/post-new.php6.94 ▼0.0397.65 ▼1,165.14
Media Library /wp-admin/upload.php3.35 ▲0.0624.65 ▲0.78
DW Shortcode options /wp-admin/options-general.php?page=dw-shortcodes-bootstrap/designwall-shortcodes.php3.3223.24

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 1 new option
New WordPress options
dwsc_options

Browser metrics Passed 4 tests

A check of browser resources used by DW Shortcodes Bootstrap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,921 ▲16716.73 ▲0.7411.83 ▲5.213.96 ▲0.63
Dashboard /wp-admin2,899 ▲386.15 ▼0.06118.61 ▼16.58158.31 ▼4.75
Posts /wp-admin/edit.php2,695 ▲43.23 ▼0.0267.81 ▲4.03142.61 ▲4.18
Add New Post /wp-admin/post-new.php1,666 ▲515.98 ▼0.12406.03 ▲14.01162.71 ▲9.82
Media Library /wp-admin/upload.php1,705 ▲75.46 ▼0.05138.06 ▲0.69186.86 ▲0.27
DW Shortcode options /wp-admin/options-general.php?page=dw-shortcodes-bootstrap/designwall-shortcodes.php1,0942.3953.29114.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • dwsc_options

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_alert.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_tabs.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_grid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_collapse.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_grid.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_buttons.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dw-shortcodes-bootstrap/inc/dws_icons.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: widget, bootstrap, responsive, buttons, shortcode...

dw-shortcodes-bootstrap/designwall-shortcodes.php 92% from 13 tests

Analyzing the main PHP file in "DW Shortcodes Bootstrap" version 2.0.1
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dw-shortcodes-bootstrap.php" instead of "designwall-shortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,154 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS4212555,056
HTML3890596
PHP74479264
JavaScript94043238

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
13 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/facebook.png1.89KB1.10KB▼ 41.73%
assets/img/dwicons.png2.21KB2.16KB▼ 2.16%
assets/images/tabs.png0.72KB0.78KB0.00%
assets/images/twitter.png2.09KB1.30KB▼ 38.02%
assets/images/collapse.png0.44KB0.36KB▼ 18.89%