84% wptagsanitizer

Code Review | WPTagSanitizer

WordPress plugin WPTagSanitizer scored84%from 54 tests.

About plugin

  • Plugin page: wptagsanitizer
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Nov 9, 2015
  • Number of updates: 6
  • Update frequency: every 2.2 days
  • Top authors: larjen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.73ms] Passed 4 tests

An overview of server-side resources used by WPTagSanitizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.54 ▼8.23
Dashboard /wp-admin3.35 ▲0.0444.46 ▼6.10
Posts /wp-admin/edit.php3.40 ▲0.0449.40 ▼0.77
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.96 ▼7.83
Media Library /wp-admin/upload.php3.27 ▲0.0435.56 ▲1.04
WPTagSanitizer /wp-admin/tools.php?page=WPTagSanitizerAdmin3.2232.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 9 new options
New WordPress options
WPTagSanitizer_JSONTABLE
WPTagSanitizer_TRANSFORMTABLE
db_upgraded
WPTagSanitizer_MESSAGES
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WPTagSanitizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.68 ▼0.711.68 ▼0.4238.98 ▼0.29
Dashboard /wp-admin2,204 ▲195.83 ▼0.0596.00 ▼8.9037.65 ▼4.88
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0339.81 ▼4.2940.72 ▲5.41
Add New Post /wp-admin/post-new.php1,536 ▲1623.18 ▲0.04669.30 ▼23.6455.98 ▲0.59
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0299.79 ▼12.2143.73 ▼4.63
WPTagSanitizer /wp-admin/tools.php?page=WPTagSanitizerAdmin8112.1823.9932.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wptagsanitizer/includes/main.php:209
    • > PHP Fatal error
      Uncaught Error: Class 'WPTagSanitizer' not found in wp-content/plugins/wptagsanitizer/includes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wptagsanitizer/includes/main.php:209

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: twitter

wptagsanitizer/WPTagSanitizer.php 92% from 13 tests

This is the main PHP file of "WPTagSanitizer" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wptagsanitizer.php" instead of "WPTagSanitizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin213 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47754176
JSON10020
Markdown19017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.33
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin