62% taxonomy-extra-fields

Code Review | Taxonomy Extra Fields (BETA)

WordPress plugin Taxonomy Extra Fields (BETA) scored 62% from 54 tests.

About plugin

  • Plugin page: taxonomy-extra-fi...
  • Plugin version: 0.6.04
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Jun 25, 2016
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: GuilleGarcia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 846 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Taxonomy Extra Fields (BETA)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3643.42 ▼5.22
Dashboard /wp-admin3.68 ▲0.3750.96 ▲1.05
Posts /wp-admin/edit.php3.73 ▲0.3748.20 ▲0.60
Add New Post /wp-admin/post-new.php6.20 ▲0.3198.86 ▲8.92
Media Library /wp-admin/upload.php3.54 ▲0.3137.76 ▲2.20
Manage Taxonomies /wp-admin/admin.php?page=tef-manage-taxonomy3.5134.70
Credits /wp-admin/admin.php?page=taxonomy-extra-fields-credits3.5436.07
Edit Field /wp-admin/admin.php?page=tef-edit-field3.5034.62
New Field /wp-admin/admin.php?page=tef-new-field3.4835.93
Taxonomy Extra Fields /wp-admin/admin.php?page=taxonomy-extra-fields3.5437.45
Delete Field /wp-admin/admin.php?page=tef-delete-field3.5034.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Taxonomy Extra Fields (BETA)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.17 ▼1.474.90 ▲3.0943.93 ▲1.09
Dashboard /wp-admin2,234 ▲434.86 ▼0.02104.16 ▼6.4841.26 ▼3.12
Posts /wp-admin/edit.php2,114 ▲252.02 ▼0.0336.03 ▼6.0739.36 ▲2.14
Add New Post /wp-admin/post-new.php1,535 ▲117.43 ▼5.67679.77 ▲5.4351.36 ▼3.63
Media Library /wp-admin/upload.php1,416 ▲314.20 ▼0.0395.38 ▼5.6342.77 ▲0.96
Manage Taxonomies /wp-admin/admin.php?page=tef-manage-taxonomy9723.3342.3122.05
Credits /wp-admin/admin.php?page=taxonomy-extra-fields-credits1,0383.1946.9767.40
Edit Field /wp-admin/admin.php?page=tef-edit-field7462.0625.3820.80
New Field /wp-admin/admin.php?page=tef-new-field7862.0223.8120.58
Taxonomy Extra Fields /wp-admin/admin.php?page=taxonomy-extra-fields1,1343.1641.6860.93
Delete Field /wp-admin/admin.php?page=tef-delete-field7682.0323.0120.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_tef_fields
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=tef-manage-taxonomy
    • > Notice in wp-content/plugins/taxonomy-extra-fields/library/class/UI/TaxonomyController.php+50
    Undefined index: taxonomy
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=taxonomy-extra-fields
    • > User deprecated in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Autoloader.php+12
    The Twig_Autoloader class is deprecated since version 1.21 and will be removed in 2.0. Use Composer instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=taxonomy-extra-fields
    • > User deprecated in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Autoloader.php+30
    Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=taxonomy-extra-fields
    • > User deprecated in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Environment.php+1100
    Passing a name as a first argument to the Twig_Environment::addFunction method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFunction" instead when defining function "__".
    • > GET request to /wp-admin/admin.php?page=tef-new-field
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'tef\UI\FieldController' does not have a method 'newAction'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=taxonomy-extra-fields
    • > Notice in wp-admin/includes/class-wp-list-table.php+1752
    Array to string conversion

SRP 0% 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
  • 20× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Field/RadioField.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Core.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Field/ImageField.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Field/LongTextField.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Field/NoTypeField.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Field/OptionsField.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/functions.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Auxiliary/TaxonomyFieldsTable.php
    • > /wp-content/plugins/taxonomy-extra-fields/library/class/Auxiliary/TaxonomiesListTable.php
    • > /wp-content/plugins/taxonomy-extra-fields/init.php
  • 149× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Spaceless.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Function' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Function/Method.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_BaseNodeVisitor' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/NodeVisitor/Sandbox.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Filter' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Expression/Filter/Default.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Sandbox.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Expression/Name.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Expression.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Expression/Test/Defined.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_NodeVisitorInterface' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/BaseNodeVisitor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/taxonomy-extra-fields/vendor/Twig/Node/Expression/Test/Sameas.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === taxonomy-extra-fields === )
You can take inspiration from this readme.txt

taxonomy-extra-fields/init.php 77% from 13 tests

The entry point to "Taxonomy Extra Fields (BETA)" version 0.6.04 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 186 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("taxonomy-extra-fields.php" instead of "init.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin23,701 lines of code in 292 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102,6405,39210,330
CSS7582245,334
JavaScript205351783,198
Sass1688371,861
LESS1434441,646
SVG100685
Twig22560439
PO File167101182
Markdown19026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity6.96
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces4
Interfaces22
Traits0
Classes184
▷ Abstract classes158.15%
▷ Concrete classes16991.85%
▷ Final classes10.59%
Methods899
▷ Static methods161.78%
▷ Public methods78787.54%
▷ Protected methods10711.90%
▷ Private methods50.56%
Functions62
▷ Named functions6198.39%
▷ Anonymous functions11.61%
Constants47
▷ Global constants510.64%
▷ Class constants4289.36%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/FontAwesome.png21.72KB10.33KB▼ 52.44%
assets/images/AnimateCSS.png18.37KB7.32KB▼ 60.12%
assets/images/TWIG.png26.74KB13.38KB▼ 49.96%
assets/images/jQueryNoty.png19.30KB10.87KB▼ 43.67%
assets/images/TEF-logo.png40.74KB20.34KB▼ 50.09%