10% wp-term-manager

Code Review | WP Term Manager

WordPress plugin WP Term Manager scored10%from 54 tests.

About plugin

  • Plugin page: wp-term-manager
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Jul 23, 2021
  • Number of updates: 8
  • Update frequency: every 82.4 days
  • Top authors: landonbotis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /495 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.86ms] Passed 4 tests

A check of server-side resources used by WP Term Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.60 ▼37.77
Dashboard /wp-admin2.09 ▼1.226.58 ▼45.66
Posts /wp-admin/edit.php2.09 ▼1.276.94 ▼44.15
Add New Post /wp-admin/post-new.php2.09 ▼3.805.47 ▼99.87
Media Library /wp-admin/upload.php2.09 ▼1.146.23 ▼29.36
WP Term Manager /wp-admin/tools.php?page=wptm_settings2.096.37

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 448 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Term Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.29 ▲0.021.63 ▼0.3142.99 ▲0.89
Dashboard /wp-admin2,213 ▲365.55 ▼0.0490.14 ▼5.5440.00 ▼1.36
Posts /wp-admin/edit.php2,118 ▲152.05 ▲0.0935.87 ▼2.7335.05 ▼0.41
Add New Post /wp-admin/post-new.php1,541 ▲1522.97 ▼0.53665.79 ▼18.9751.31 ▼13.46
Media Library /wp-admin/upload.php1,415 ▲154.33 ▲0.23100.89 ▼17.8442.12 ▼10.20
WP Term Manager /wp-admin/tools.php?page=wptm_settings8542.2227.2729.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=wptm_settings
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=wptm_settings
    • > Notice in wp-content/plugins/wp-term-manager/includes/Settings.php+184
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/apigen/hook-docs.php
  • 58× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-term-manager/vendor/cmb2/cmb2/includes/types/CMB2_Type_Title.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

wp-term-manager/wp-term-manager.php 77% from 13 tests

The principal PHP file in "WP Term Manager" v. 1.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

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
No dangerous file extensions were detected65,030 lines of code in 267 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP793,2256,80311,863
CSS171,3841,2477,323
XML2004,498
JSON6003,701
JavaScript135026942,716
Sass16300251,379
Markdown62630794
Bourne Shell46745209
YAML2116190
diff216834

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.35
Average class complexity16.96
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes90
▷ Abstract classes1112.22%
▷ Concrete classes7987.78%
▷ Final classes00.00%
Methods891
▷ Static methods12814.37%
▷ Public methods75284.40%
▷ Protected methods13314.93%
▷ Private methods60.67%
Functions39
▷ Named functions3897.44%
▷ Anonymous functions12.56%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.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
22 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/inherit.png0.15KB0.10KB▼ 29.61%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/tree-hasnext.png0.13KB0.09KB▼ 31.25%
vendor/cmb2/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%