79% clean-unused-shortcodes

Code Review | Clean unused shortcodes

WordPress plugin Clean unused shortcodes scored79%from 54 tests.

About plugin

  • Plugin page: clean-unused-shor...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2022
  • Latest release: Jan 20, 2023
  • Number of updates: 7
  • Update frequency: every 19.4 days
  • Top authors: amrelarabi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /396 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.73ms] Passed 4 tests

This is a short check of server-side resources used by Clean unused shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0747.70 ▲10.38
Dashboard /wp-admin3.37 ▲0.0745.70 ▼2.74
Posts /wp-admin/edit.php3.48 ▲0.1346.04 ▼2.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.05 ▼9.80
Media Library /wp-admin/upload.php3.29 ▲0.0737.56 ▲4.59
Clean unused shortcodes /wp-admin/tools.php?page=clean-unused-shortcodes3.2630.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Clean unused shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.69 ▼1.047.92 ▲6.1840.37 ▲1.71
Dashboard /wp-admin2,210 ▲334.93 ▼0.7590.29 ▲1.3436.31 ▼3.75
Posts /wp-admin/edit.php2,115 ▲152.26 ▲0.3035.51 ▼1.2931.63 ▲0.02
Add New Post /wp-admin/post-new.php1,540 ▲1223.13 ▲0.09618.95 ▼25.1656.62 ▼0.78
Media Library /wp-admin/upload.php1,418 ▲184.38 ▲0.1999.06 ▼5.7241.47 ▼1.65
Clean unused shortcodes /wp-admin/tools.php?page=clean-unused-shortcodes9072.1434.4325.63

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_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/clean-unused-shortcodes/public/partials/clean-unused-shortcodes-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/clean-unused-shortcodes/admin/partials/clean-unused-shortcodes-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
2 plugin tags: shortcode, clean

clean-unused-shortcodes/clean-unused-shortcodes.php Passed 13 tests

The entry point to "Clean unused shortcodes" version 1.0.4 is a PHP file that has certain tags in its header comment area
49 characters long description:
Remove unused shortcodes from your posts content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin450 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PHP12114552271
JavaScript626287110
CSS30469

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected