10% custom-taxonomy-category-and-term-fields

Code Review | LSD Custom taxonomy and category meta

WordPress plugin LSD Custom taxonomy and category meta scored10%from 54 tests.

About plugin

  • Plugin page: custom-taxonomy-c...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2014
  • Latest release: Oct 28, 2014
  • Number of updates: 27
  • Update frequency: every 3.8 days
  • Top authors: BasMatthee (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /8,508 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/custom-taxonomy-category-and-term-fields/views/options.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wptm_admin has a deprecated constructor

Server metrics [RAM: ▼1.73MB] [CPU: ▼48.79ms] Passed 4 tests

A check of server-side resources used by LSD Custom taxonomy and category meta
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.15 ▼1.32
Dashboard /wp-admin2.21 ▼1.097.46 ▼40.24
Posts /wp-admin/edit.php2.21 ▼1.148.14 ▼37.55
Add New Post /wp-admin/post-new.php2.21 ▼3.677.73 ▼88.92
Media Library /wp-admin/upload.php2.21 ▼1.026.68 ▼28.45
Category Meta /wp-admin/options-general.php?page=category_meta2.216.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: 1 new table, 8 new options
New tables
wp_termsmeta
New WordPress options
wptm_configuration
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
wptm_db_version
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

LSD Custom taxonomy and category meta: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.36 ▼1.021.76 ▼0.0440.07 ▼3.23
Dashboard /wp-admin2,213 ▲254.87 ▼0.03102.64 ▼14.4539.18 ▼5.67
Posts /wp-admin/edit.php2,096 ▲102.01 ▼0.0038.52 ▲3.4035.44 ▲0.28
Add New Post /wp-admin/post-new.php1,520 ▼1617.59 ▼5.64701.44 ▲48.9376.14 ▲23.94
Media Library /wp-admin/upload.php1,398 ▲164.15 ▼0.0892.71 ▼4.1040.79 ▲0.57
Category Meta /wp-admin/options-general.php?page=category_meta9482.0526.1928.36

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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/custom-taxonomy-category-and-term-fields/views/options.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wptm_admin has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=category_meta
    • > Deprecated in wp-content/plugins/custom-taxonomy-category-and-term-fields/views/options.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wptm_admin has a deprecated constructor

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/custom-taxonomy-category-and-term-fields/wp-category-meta.php on line 65
    • > PHP Warning
      Use of undefined constant PLUGINDIR - assumed 'PLUGINDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-taxonomy-category-and-term-fields/wp-category-meta.php on line 49
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-taxonomy-category-and-term-fields/wp-category-meta.php on line 32
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-taxonomy-category-and-term-fields/wp-category-meta.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-taxonomy-category-and-term-fields/wp-category-meta.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (The Settings-page where you can add the custom fields), #2 (Example of the custom fields under the general category fields), #3 (Example of the custom fields under the general category fields)
Please take inspiration from this readme.txt

custom-taxonomy-category-and-term-fields/wp-category-meta.php 92% from 13 tests

Analyzing the main PHP file in "LSD Custom taxonomy and category meta" version 1.3.2
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-taxonomy-category-and-term-fields.php" instead of "wp-category-meta.php")

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
Good job! No executable or dangerous file extensions detected751 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2248142522
PO File36573182
JavaScript110147

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.16MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png20.10KB11.35KB▼ 43.54%
screenshot-3.png117.71KB80.15KB▼ 31.91%
screenshot-1.png26.55KB14.35KB▼ 45.94%