84% taxonomy-switcher

Code Review | Taxonomy Switcher

WordPress plugin Taxonomy Switcher scored84%from 54 tests.

About plugin

  • Plugin page: taxonomy-switcher
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Nov 6, 2023
  • Number of updates: 25
  • Update frequency: every 142.6 days
  • Top authors: jtsternberg (52%)tw2113 (44%)webdevstudios (12%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active /40,055 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.97ms] Passed 4 tests

An overview of server-side resources used by Taxonomy Switcher
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.24 ▼3.21
Dashboard /wp-admin3.36 ▲0.0146.64 ▼13.35
Posts /wp-admin/edit.php3.47 ▲0.1149.18 ▼0.03
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.52 ▼15.27
Media Library /wp-admin/upload.php3.28 ▲0.0534.66 ▲1.55
Taxonomy Switcher /wp-admin/tools.php?page=taxonomy-switcher3.2631.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Taxonomy Switcher
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.67 ▲0.391.81 ▲0.0642.81 ▼0.17
Dashboard /wp-admin2,199 ▲225.55 ▼0.1091.63 ▲2.0538.53 ▼1.29
Posts /wp-admin/edit.php2,101 ▼21.96 ▼0.0039.84 ▼0.0935.95 ▼0.23
Add New Post /wp-admin/post-new.php1,529 ▼1023.22 ▲0.05608.66 ▼7.8944.74 ▼25.58
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.0796.30 ▼2.2041.71 ▼2.09
Taxonomy Switcher /wp-admin/tools.php?page=taxonomy-switcher9472.0425.4330.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • 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
Even though everything seems fine, this is not 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
Please 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 plugins_url() in wp-content/plugins/taxonomy-switcher/Taxonomy_Switcher_UI.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/taxonomy-switcher/wp-cli.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Admin page), #2 (Live-searching for a parent term)
Please take inspiration from this readme.txt

taxonomy-switcher/taxonomy-switcher.php Passed 13 tests

The primary PHP file in "Taxonomy Switcher" version 1.0.6 is used by WordPress to initiate all plugin functionality
54 characters long description:
Switches the Taxonomy of terms to a different Taxonomy

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
Everything looks great! No dangerous files found in this plugin459 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4152280375
JavaScript111762
Markdown113022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.00
▷ Minimum class complexity6.00
▷ Maximum class complexity22.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2395.83%
▷ Protected methods14.17%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.72KB11.82KB▼ 7.05%
screenshot-2.png13.83KB12.88KB▼ 6.88%