10% require-taxonomy-image-category-tag

Code Review | Require & Limit Categories, Tags, Featured Image and taxonomies

WordPress plugin Require & Limit Categories, Tags, Featured Image and taxonomies scored 10% from 54 tests.

About plugin

  • Plugin page: require-taxonomy-...
  • Plugin version: 1.27
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Jan 3, 2019
  • Latest release: Jul 30, 2022
  • Number of updates: 68
  • Update frequency: every 19.2 days
  • Top authors: itasksoftware (41.18%)ttodua (39.71%)puvoxsoftware (22.06%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 1,170 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 had errors
    • > Error in wp-content/plugins/require-taxonomy-image-category-tag/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/require-taxonomy-image-category-tag/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/require-taxonomy-image-category-tag/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲2.19MB] [CPU: ▲12.13ms] Passed 4 tests

A check of server-side resources used by Require & Limit Categories, Tags, Featured Image and taxonomies
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.69 ▲2.2353.10 ▲8.06
Dashboard /wp-admin5.52 ▲2.2258.67 ▲6.87
Posts /wp-admin/edit.php5.58 ▲2.2262.47 ▲16.63
Add New Post /wp-admin/post-new.php8.06 ▲2.18115.09 ▲18.78
Media Library /wp-admin/upload.php5.38 ▲2.1653.73 ▲16.95
Require Limits for post fields /wp-admin/options-general.php?page=require-taxonomy-image-category-tag5.3652.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_require_taxonomy_image_category_tag__errors_log
New WordPress options
theysaidso_admin_options
can_compress_scripts
require-taxonomy-image-category-tag
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Require & Limit Categories, Tags, Featured Image and taxonomies
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.29 ▼0.924.49 ▲2.7439.36 ▼4.29
Dashboard /wp-admin2,213 ▲284.84 ▼0.09107.72 ▼10.1239.26 ▼10.23
Posts /wp-admin/edit.php2,099 ▲102.02 ▼0.0340.38 ▲5.1436.25 ▲2.09
Add New Post /wp-admin/post-new.php1,547 ▲3318.11 ▲0.54590.52 ▼102.2757.31 ▲7.89
Media Library /wp-admin/upload.php1,392 ▲74.15 ▼0.0695.15 ▼10.7842.16 ▼4.40
Require Limits for post fields /wp-admin/options-general.php?page=require-taxonomy-image-category-tag1,0582.2830.4462.50

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_require_taxonomy_image_category_tag__errors_log
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • require-taxonomy-image-category-tag
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/require-taxonomy-image-category-tag/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

require-taxonomy-image-category-tag/index.php 92% from 13 tests

The principal PHP file in "Require & Limit Categories, Tags, Featured Image and taxonomies" v. 1.27 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("require-taxonomy-image-category-tag.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,698 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,2505,0963,603
JavaScript1191095

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity347.00
▷ Minimum class complexity12.00
▷ Maximum class complexity1,076.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods849
▷ Static methods10212.01%
▷ Public methods84299.18%
▷ Protected methods00.00%
▷ Private methods70.82%
Functions89
▷ Named functions00.00%
▷ Anonymous functions89100.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin