78% shortcode-cleaner-lite

Code Review | Shortcode Cleaner Lite

WordPress plugin Shortcode Cleaner Lite scored78%from 54 tests.

About plugin

  • Plugin page: shortcode-cleaner...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Feb 8, 2018
  • Latest release: Mar 11, 2021
  • Number of updates: 28
  • Update frequency: every 40.3 days
  • Top authors: mandooox (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

3,000+ active /29,323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.80MB] [CPU: ▲3.80ms] Passed 4 tests

Server-side resources used by Shortcode Cleaner Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8144.06 ▲6.90
Dashboard /wp-admin4.11 ▲0.8148.40 ▲2.40
Posts /wp-admin/edit.php4.16 ▲0.8058.23 ▲11.43
Add New Post /wp-admin/post-new.php6.69 ▲0.8091.08 ▼5.10
Media Library /wp-admin/upload.php4.03 ▲0.8044.81 ▲10.99

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 141 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
_jo_scl_settings_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Shortcode Cleaner Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.46 ▲0.111.94 ▲0.2344.02 ▲3.84
Dashboard /wp-admin2,215 ▲275.85 ▼0.00137.25 ▲33.8163.93 ▲20.20
Posts /wp-admin/edit.php2,113 ▲212.03 ▲0.0342.49 ▲6.5736.67 ▲1.71
Add New Post /wp-admin/post-new.php1,548 ▲3423.20 ▲5.64680.77 ▼2.7856.79 ▲4.78
Media Library /wp-admin/upload.php1,414 ▲264.23 ▼0.01110.20 ▼1.3947.61 ▲0.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/templates/metaboxes-options.php
  • 38× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Icon.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Helper\\System' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/templates/system-info.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Checkbox.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/templates/settings-options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Fieldset.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Image.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Gallery.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/ImageSelect.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Subheading.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Codestar\\Options\\Field' not found in wp-content/plugins/shortcode-cleaner-lite/vendor/codestar/codestar/core/Options/Field/Text.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

shortcode-cleaner-lite/shortcode-cleaner-lite.php 92% from 13 tests

The entry point to "Shortcode Cleaner Lite" version 1.0.9 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • 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
Success! There were no dangerous files found in this plugin20,476 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP823,0656,2728,823
JavaScript108319125,120
CSS164392613,385
Sass634102,089
PO File2246272665
JSON800323
Markdown330071

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity13.95
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes64
▷ Abstract classes11.56%
▷ Concrete classes6398.44%
▷ Final classes11.59%
Methods283
▷ Static methods13146.29%
▷ Public methods27396.47%
▷ Protected methods82.83%
▷ Private methods20.71%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants29
▷ Global constants00.00%
▷ Class constants29100.00%
▷ Public constants29100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/shortcode-cleaner-lite.png2.26KB1.35KB▼ 40.58%
vendor/codestar/codestar/assets/images/chosen-sprite.png0.53KB0.88KB0.00%
vendor/codestar/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%
vendor/codestar/codestar/assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%