94% dv-shortcode-whitelist

Code Review | DV Shortcode Whitelist

WordPress plugin DV Shortcode Whitelist scored 94% from 54 tests.

About plugin

  • Plugin page: dv-shortcode-whit...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.9.2
  • First release: Dec 20, 2018
  • Latest release: Apr 29, 2019
  • Number of updates: 10
  • Update frequency: every 13.0 days
  • Top authors: egemenerd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active / 2,472 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▼295.86ms] Passed 4 tests

This is a short check of server-side resources used by DV Shortcode Whitelist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4161.23 ▲11.22
Dashboard /wp-admin4.15 ▲0.7436.23 ▲3.57
Posts /wp-admin/edit.php4.35 ▲0.7040.42 ▲3.79
Add New Post /wp-admin/post-new.php7.60 ▲0.6395.96 ▼1,191.89
Media Library /wp-admin/upload.php4.03 ▲0.7327.05 ▲1.11
DV Shortcode Whitelist Settings /wp-admin/plugins.php?page=dvscwl_options4.5529.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DV Shortcode Whitelist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2416.06 ▲0.457.46 ▲1.192.78 ▼0.17
Dashboard /wp-admin2,906 ▲456.11 ▼0.05120.97 ▼14.71162.97 ▲2.20
Posts /wp-admin/edit.php2,706 ▲153.27 ▲0.0367.81 ▲5.28144.69 ▲2.49
Add New Post /wp-admin/post-new.php1,683 ▼2818.49 ▼2.27395.89 ▼63.67162.32 ▲6.45
Media Library /wp-admin/upload.php1,716 ▲215.57 ▲0.04140.64 ▼5.47186.31 ▼0.32
DV Shortcode Whitelist Settings /wp-admin/plugins.php?page=dvscwl_options1,7042.7963.48112.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dv-shortcode-whitelist/cmb2/init.php:72
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/dv-shortcode-whitelist/cmb2/includes/types/CMB2_Type_Picker_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

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
These attributes need your attention: The official readme.txt might help

dv-shortcode-whitelist/dv-shortcode-whitelist.php 92% from 13 tests

The main PHP script in "DV Shortcode Whitelist" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin14,294 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
PHP552,0175,6866,946
CSS141,1641,1484,646
Sass16300251,378
JavaScript83204091,324

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity18.48
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes66
▷ Abstract classes812.12%
▷ Concrete classes5887.88%
▷ Final classes00.00%
Methods518
▷ Static methods8616.60%
▷ Public methods42682.24%
▷ Protected methods8917.18%
▷ Private methods30.58%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.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
14 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%