78% required-taxonomies

Code Review | WP Required Taxonomies - Categories and Tags Mandatory

WordPress plugin WP Required Taxonomies - Categories and Tags Mandatory scored78%from 54 tests.

About plugin

  • Plugin page: required-taxonomies
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: Jul 1, 2022
  • Number of updates: 25
  • Update frequency: every 62.9 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /16,477 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.06MB] [CPU: ▼2.21ms] Passed 4 tests

A check of server-side resources used by WP Required Taxonomies - Categories and Tags Mandatory
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.98 ▼7.39
Dashboard /wp-admin3.37 ▲0.0746.04 ▼3.31
Posts /wp-admin/edit.php3.48 ▲0.1346.24 ▼3.14
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.12 ▲5.53
Media Library /wp-admin/upload.php3.29 ▲0.0638.80 ▲5.02
Required Taxonomies /wp-admin/options-general.php?page=wprtt_welcome_page3.3134.13
Required Taxonomies /wp-admin/admin.php?page=wprtt_welcome_page3.3135.14
Required Taxonomies /wp-admin/admin.php?page=wprtt_whats_new3.2332.51

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
wprtt_welcome_redirect
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Required Taxonomies - Categories and Tags Mandatory
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.444.50 ▲2.3740.13 ▼2.04
Dashboard /wp-admin2,210 ▲195.83 ▼0.1795.92 ▼7.9439.18 ▼0.72
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0240.20 ▲5.9935.20 ▼0.75
Add New Post /wp-admin/post-new.php1,536 ▼622.96 ▲4.84589.59 ▼12.4059.25 ▼2.44
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0094.26 ▼3.2939.73 ▼2.98
Required Taxonomies /wp-admin/options-general.php?page=wprtt_welcome_page9122.0423.3431.51
Required Taxonomies /wp-admin/admin.php?page=wprtt_welcome_page8951.7123.0229.49
Required Taxonomies /wp-admin/admin.php?page=wprtt_whats_new7722.0522.9224.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • wprtt_welcome_redirect
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wprtt_whats_new
    • > Warning in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/index.php+164
    include(/1.1.9.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wprtt_whats_new
    • > Warning in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/index.php+164
    include(): Failed opening '/1.1.9.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=wprtt_whats_new
    • > Notice in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/index.php+166
    Undefined variable: items
    • > GET request to /wp-admin/admin.php?page=wprtt_whats_new
    • > Warning in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/index.php+182
    include(): Filename cannot be empty
    • > GET request to /wp-admin/admin.php?page=wprtt_whats_new
    • > Warning in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/index.php+182
    include(): Failed opening '' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/required-taxonomies/index.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/views/page-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/required-taxonomies/views/welcome-page-content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/required-taxonomies/vendor/vg-plugin-sdk/samples/email-optin-form.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: Please take inspiration from this readme.txt

required-taxonomies/index.php 92% from 13 tests

The main file in "WP Required Taxonomies - Categories and Tags Mandatory" v. 1.1.9 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("required-taxonomies.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin543 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP511542455
CSS16048
JavaScript13540

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.50
▷ Minimum class complexity19.00
▷ Maximum class complexity24.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin