78% taghound-media-tagger

Code Review | Taghound Media Tagger

WordPress plugin Taghound Media Tagger scored78%from 54 tests.

About plugin

  • Plugin page: taghound-media-ta...
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2016
  • Latest release: Dec 2, 2017
  • Number of updates: 30
  • Update frequency: every 18.0 days
  • Top authors: jplhomer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Taghound Media Tagger
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.67 ▼6.69
Dashboard /wp-admin3.46 ▲0.1552.82 ▼0.81
Posts /wp-admin/edit.php3.57 ▲0.2152.29 ▲4.62
Add New Post /wp-admin/post-new.php6.07 ▲0.1887.01 ▼9.60
Media Library /wp-admin/upload.php3.38 ▲0.1544.02 ▲3.70
Tags /wp-admin/edit-tags.php?taxonomy=tmt_tag&post_type=attachment3.3745.06
Taghound /wp-admin/options-general.php?page=taghound-settings3.3546.93

Server storage [IO: ▲0.28MB] [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: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Taghound Media Tagger
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.44 ▲0.271.91 ▲0.0748.21 ▼1.18
Dashboard /wp-admin2,205 ▲205.82 ▼0.04107.66 ▼11.8842.92 ▲3.91
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0247.67 ▲9.8837.26 ▼0.40
Add New Post /wp-admin/post-new.php1,539 ▲423.13 ▼0.12642.68 ▲3.8373.62 ▲4.12
Media Library /wp-admin/upload.php1,420 ▲324.25 ▲0.03121.40 ▲8.5444.67 ▼2.15
Tags /wp-admin/edit-tags.php?taxonomy=tmt_tag&post_type=attachment1,2422.1433.3429.15
Taghound /wp-admin/options-general.php?page=taghound-settings8231.9849.6432.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taghound-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taghound-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taghound-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taghound-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/taghound-media-tagger/tests/test-attachment.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/taghound-media-tagger/tests/test-valid-image-specification.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/taghound-media-tagger/tests/test-tagger-service.php:13
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/taghound-media-tagger/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Taghound_Media_Tagger\\add_action() in wp-content/plugins/taghound-media-tagger/taxonomies/tmt-tag.php:46
    • > PHP Warning
      Use of undefined constant TMT_SETTING_PREFIX - assumed 'TMT_SETTING_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/taghound-media-tagger/lib/class-admin-settings.php on line 55
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/taghound-media-tagger/tests/helpers/class-attachment-helper.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Taghound_Media_Tagger\\add_action() in wp-content/plugins/taghound-media-tagger/taxonomies/tmt-tag.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/taghound-media-tagger/tests/test-bulk-tagger-service.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Taghound_Media_Tagger\\tmt_can_be_enabled() in wp-content/plugins/taghound-media-tagger/lib/class-admin-settings.php:70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: tagging, admin, images, media gallery, neural network...

taghound-media-tagger/taghound-media-tagger.php 92% from 13 tests

The main file in "Taghound Media Tagger" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,744 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP16244426919
JavaScript412054466
Markdown2600132
Bourne Shell121799
CSS19054
YAML10032
XML23028
JSON11014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.85
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods57
▷ Static methods915.79%
▷ Public methods5494.74%
▷ Protected methods35.26%
▷ Private methods00.00%
Functions15
▷ Named functions853.33%
▷ Anonymous functions746.67%
Constants4
▷ Global constants4100.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 images were found in this plugin