78% shortcode-cleanup

Code Review | Shortcode Cleanup

WordPress plugin Shortcode Cleanup scored78%from 54 tests.

About plugin

  • Plugin page: shortcode-cleanup
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 18, 2013
  • Latest release: Apr 4, 2013
  • Number of updates: 3
  • Update frequency: every 15.0 days
  • Top authors: rooteerooroo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.80ms] Passed 4 tests

A check of server-side resources used by Shortcode Cleanup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.16 ▼5.29
Dashboard /wp-admin3.31 ▲0.0149.25 ▼6.16
Posts /wp-admin/edit.php3.36 ▲0.0052.56 ▲1.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.21 ▼6.53
Media Library /wp-admin/upload.php3.23 ▲0.0034.36 ▼5.22
Shortcode Cleanup /wp-admin/tools.php?page=shortcode_cleanup_admin_page3.2030.32

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Shortcode Cleanup: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.20 ▼0.292.24 ▲0.4144.42 ▼0.19
Dashboard /wp-admin2,204 ▲245.63 ▼0.0395.60 ▲3.0445.74 ▲0.34
Posts /wp-admin/edit.php2,109 ▲91.98 ▼0.0135.88 ▼2.7343.52 ▲6.66
Add New Post /wp-admin/post-new.php1,364 ▼16416.61 ▼6.76574.55 ▼44.7332.48 ▼17.10
Media Library /wp-admin/upload.php1,406 ▲64.19 ▲0.0498.06 ▼16.3439.30 ▼8.07
Shortcode Cleanup /wp-admin/tools.php?page=shortcode_cleanup_admin_page1,5251.6629.7848.66

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/shortcode-cleanup/classes/scShortcodeCleanup.class.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-cleanup/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-cleanup/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === shortcode-cleanup === )
Please take inspiration from this readme.txt

shortcode-cleanup/shortcode_cleanup.php 92% from 13 tests

Analyzing the main PHP file in "Shortcode Cleanup" version 0.5
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shortcode-cleanup.php" instead of "shortcode_cleanup.php")

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
Good job! No executable or dangerous file extensions detected388 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33422388

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity6.17
▷ Minimum method complexity3.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods116.67%
▷ Protected methods00.00%
▷ Private methods583.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin