84% shortcode-scrubber

Code Review | Shortcode Scrubber

WordPress plugin Shortcode Scrubber scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-scrubber
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.6
  • WordPress version: 6.3.1
  • First release: Sep 11, 2018
  • Latest release: Dec 13, 2020
  • Number of updates: 11
  • Update frequency: every 75.6 days
  • Top authors: wpscholar (72.73%)woodent (36.36%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,980 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼3.87ms] Passed 4 tests

An overview of server-side resources used by Shortcode Scrubber
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1635.81 ▲0.51
Dashboard /wp-admin3.48 ▲0.1743.79 ▼2.07
Posts /wp-admin/edit.php3.59 ▲0.2345.37 ▼1.37
Add New Post /wp-admin/post-new.php6.06 ▲0.1779.61 ▼11.86
Media Library /wp-admin/upload.php3.40 ▲0.1734.40 ▼0.16
Find Post Usages /wp-admin/admin.php?page=shortcode-scrubber-post-usages3.4832.82
Shortcodes /wp-admin/admin.php?page=shortcode-scrubber3.4638.79
Find Widget Usages /wp-admin/admin.php?page=shortcode-scrubber-widget-usages3.4432.44
Manage Filters /wp-admin/admin.php?page=shortcode-scrubber-manage3.3831.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Shortcode Scrubber
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.39 ▲0.041.65 ▲0.0440.41 ▲1.80
Dashboard /wp-admin2,233 ▲535.61 ▼0.0483.45 ▼2.9739.08 ▼0.91
Posts /wp-admin/edit.php2,135 ▲381.95 ▼0.0936.71 ▼0.0834.94 ▼2.17
Add New Post /wp-admin/post-new.php1,554 ▲2023.09 ▲4.86651.42 ▲1.2154.90 ▼8.81
Media Library /wp-admin/upload.php1,438 ▲414.24 ▲0.03101.25 ▲1.7946.58 ▲1.45
Find Post Usages /wp-admin/admin.php?page=shortcode-scrubber-post-usages1,1252.0424.7629.28
Shortcodes /wp-admin/admin.php?page=shortcode-scrubber1,2512.0022.7528.37
Find Widget Usages /wp-admin/admin.php?page=shortcode-scrubber-widget-usages1,1862.0129.4129.74
Manage Filters /wp-admin/admin.php?page=shortcode-scrubber-manage8902.0324.8922.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\get_actionable_shortcode_filters() in wp-content/plugins/shortcode-scrubber/templates/form-manage-shortcode.php:15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shortcode-scrubber/autoload/ShortcodeFilterListTable.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\esc_html_e() in wp-content/plugins/shortcode-scrubber/templates/shortcode-post-usages.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\esc_html_e() in wp-content/plugins/shortcode-scrubber/templates/shortcode-manage-filters.php:17
    • > PHP Warning
      require(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/shortcode-scrubber/autoload/ShortcodeFilterListTable.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\esc_html_e() in wp-content/plugins/shortcode-scrubber/templates/shortcode-widget-usages.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\esc_html_e() in wp-content/plugins/shortcode-scrubber/templates/shortcode-filters.php:12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shortcode-scrubber/autoload/ShortcodeWidgetListTable.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-scrubber/includes/hooks.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShortcodeScrubber\\esc_attr() in wp-content/plugins/shortcode-scrubber/templates/form-select-shortcode.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: shortcode

shortcode-scrubber/shortcode-scrubber.php 85% from 13 tests

This is the main PHP file of "Shortcode Scrubber" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,182 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP285891,0952,182

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods115
▷ Static methods108.70%
▷ Public methods9280.00%
▷ Protected methods2219.13%
▷ Private methods10.87%
Functions48
▷ Named functions2450.00%
▷ Anonymous functions2450.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin