84% unused-shortcodes

Code Review | Unused Shortcodes

WordPress plugin Unused Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: unused-shortcodes
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Mar 30, 2023
  • Number of updates: 30
  • Update frequency: every 110.9 days
  • Top authors: scott.deluzio (93.33%)ampmode (10%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /3,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.30ms] Passed 4 tests

This is a short check of server-side resources used by Unused Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼5.13
Dashboard /wp-admin3.31 ▲0.0147.69 ▼4.96
Posts /wp-admin/edit.php3.36 ▲0.0147.28 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.70 ▼12.89
Media Library /wp-admin/upload.php3.24 ▲0.0137.94 ▲0.60
Unused Shortcodes /wp-admin/options-general.php?page=unusedshortcodes3.2535.74

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
find_shortcode
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Unused Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.74 ▼0.2340.29 ▼3.58
Dashboard /wp-admin2,199 ▲225.64 ▲0.0489.22 ▼1.7540.54 ▲1.78
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0135.28 ▼4.8534.29 ▼1.13
Add New Post /wp-admin/post-new.php1,537 ▲1118.22 ▼5.38620.05 ▼10.9072.99 ▲17.57
Media Library /wp-admin/upload.php1,401 ▲14.27 ▲0.09103.54 ▲1.1247.19 ▲5.04
Unused Shortcodes /wp-admin/options-general.php?page=unusedshortcodes1,0053.3673.9439.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unused-shortcodes/unused-shortcodes.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/unused-shortcodes/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: shortcode, code, admin, plugin, shortcodes...

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

"Unused Shortcodes" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
A plugin to display shortcodes that are not currently being used on a WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin72 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2182972

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin