10% attachment-taxonomy-support

Code Review | Attachment Taxonomy Support

WordPress plugin Attachment Taxonomy Support scored10%from 54 tests.

About plugin

  • Plugin page: attachment-taxono...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 21, 2011
  • Latest release: Dec 14, 2012
  • Number of updates: 27
  • Update frequency: every 15.2 days
  • Top authors: husobj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /6,298 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
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/attachment-taxonomy-support/attachment-taxonomy-support.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; AttachmentTaxSupp has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼50.68ms] Passed 4 tests

A check of server-side resources used by Attachment Taxonomy Support
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.67 ▼35.79
Dashboard /wp-admin2.09 ▼1.217.10 ▼39.25
Posts /wp-admin/edit.php2.09 ▼1.266.00 ▼38.32
Add New Post /wp-admin/post-new.php2.09 ▼3.796.14 ▼89.35
Media Library /wp-admin/upload.php2.09 ▼1.135.17 ▼25.80
Attachment Category /wp-admin/edit-tags.php?taxonomy=attachment_category&post_type=attachment2.106.56
Attachment Tags /wp-admin/edit-tags.php?taxonomy=attachment_tag&post_type=attachment2.105.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Attachment Taxonomy Support: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9814.38 ▲0.121.98 ▲0.2543.45 ▼3.35
Dashboard /wp-admin2,214 ▲264.89 ▼0.12106.11 ▼7.4541.83 ▼1.89
Posts /wp-admin/edit.php2,097 ▲82.01 ▲0.0038.88 ▼1.1934.69 ▼1.40
Add New Post /wp-admin/post-new.php1,539 ▲623.27 ▼0.06664.70 ▼11.8154.00 ▼1.09
Media Library /wp-admin/upload.php1,390 ▲24.17 ▼0.0994.58 ▼17.5741.89 ▼5.97
Attachment Category /wp-admin/edit-tags.php?taxonomy=attachment_category&post_type=attachment1,2672.1426.2329.04
Attachment Tags /wp-admin/edit-tags.php?taxonomy=attachment_tag&post_type=attachment1,2392.1328.6527.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/attachment-taxonomy-support/attachment-taxonomy-support.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; AttachmentTaxSupp has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=attachment_tag&post_type=attachment
    • > Deprecated in wp-content/plugins/attachment-taxonomy-support/attachment-taxonomy-support.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; AttachmentTaxSupp has a deprecated constructor

SRP 50% 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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/attachment-taxonomy-support/attachment-taxonomy-support.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/attachment-taxonomy-support/admin/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

attachment-taxonomy-support/attachment-taxonomy-support.php Passed 13 tests

This is the main PHP file of "Attachment Taxonomy Support" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
Improved support for media and attachments in WordPress versions before WordPress 3.5+

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
Success! There were no dangerous files found in this plugin280 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP236110264
JavaScript14516

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity14.00
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected