62% tp-restore-categories-and-taxonomies

Code Review | TP Restore Categories And Taxonomies

WordPress plugin TP Restore Categories And Taxonomies scored62%from 54 tests.

About plugin

  • Plugin page: tp-restore-catego...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 20, 2023
  • Latest release: Aug 29, 2023
  • Number of updates: 9
  • Update frequency: every 7.8 days
  • Top authors: tplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /172 total downloads

Benchmarks

Plugin footprint 65% 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.11MB] [CPU: ▼1.47ms] Passed 4 tests

Analyzing server-side resources used by TP Restore Categories And Taxonomies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1046.11 ▲2.21
Dashboard /wp-admin3.41 ▲0.1150.96 ▼1.45
Posts /wp-admin/edit.php3.52 ▲0.1751.68 ▲3.18
Add New Post /wp-admin/post-new.php6.01 ▲0.1291.20 ▼4.47
Media Library /wp-admin/upload.php3.33 ▲0.1037.68 ▼2.16
Settings /wp-admin/admin.php?page=tpmcattt-admin-settings-page3.3035.24
Taxonomies Trash /wp-admin/admin.php?page=tpmcattt-admin-page3.2747.85

Server storage [IO: ▲0.18MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: 5 new tables, 6 new options
New tables
tpmcattt_term_taxonomy
tpmcattt_termmeta
tpmcattt_woocommerce_attribute_taxonomies
tpmcattt_term_relationships
tpmcattt_terms
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for TP Restore Categories And Taxonomies
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲6213.53 ▼0.871.78 ▼0.4540.11 ▼7.84
Dashboard /wp-admin2,239 ▲545.22 ▲0.35116.71 ▼1.4741.71 ▼2.58
Posts /wp-admin/edit.php2,104 ▲152.45 ▲0.4547.66 ▲10.5634.56 ▼0.21
Add New Post /wp-admin/post-new.php1,543 ▲1318.00 ▼5.30700.88 ▲46.3366.95 ▲16.57
Media Library /wp-admin/upload.php1,421 ▲334.53 ▲0.27107.29 ▼8.9442.08 ▼8.60
Settings /wp-admin/admin.php?page=tpmcattt-admin-settings-page1,42512.20283.6638.60
Taxonomies Trash /wp-admin/admin.php?page=tpmcattt-admin-page7992.0937.9731.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables detected upon uninstall: 5 tables
    • tpmcattt_term_relationships
    • tpmcattt_term_taxonomy
    • tpmcattt_terms
    • tpmcattt_woocommerce_attribute_taxonomies
    • tpmcattt_termmeta
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tpmcattt-admin-page
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tp-restore-categories-and-taxonomies/admin/partials/tp-move-categories-and-taxonomies-to-trash-admin-display.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tp-restore-categories-and-taxonomies/admin/partials/tp-move-categories-and-taxonomies-to-trash-admin-settings-display.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=tpmcattt-admin-settings-page
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=tpmcattt-admin-settings-page 196 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

tp-restore-categories-and-taxonomies/tp-restore-categories-and-taxonomies.php 85% from 13 tests

The primary PHP file in "TP Restore Categories And Taxonomies" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,085 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11247486659
CSS22020343
JavaScript2203383

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods39
▷ Static methods717.95%
▷ Public methods3589.74%
▷ Protected methods00.00%
▷ Private methods410.26%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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