83% conditional-taxonomy-option

Code Review | Conditional Taxonomy Option

WordPress plugin Conditional Taxonomy Option scored83%from 54 tests.

About plugin

  • Plugin page: conditional-taxon...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Jan 5, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: yamuaryal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.39ms] Passed 4 tests

Server-side resources used by Conditional Taxonomy Option
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.74 ▼1.82
Dashboard /wp-admin3.35 ▲0.0546.30 ▼1.31
Posts /wp-admin/edit.php3.47 ▲0.1144.69 ▼1.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.97 ▼24.98
Media Library /wp-admin/upload.php3.28 ▲0.0536.83 ▲3.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Conditional Taxonomy Option
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17713.66 ▼0.655.43 ▲3.6444.33 ▼4.43
Dashboard /wp-admin2,210 ▲194.86 ▼0.05112.07 ▲3.0737.30 ▲0.25
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0238.35 ▼0.5338.92 ▲4.11
Add New Post /wp-admin/post-new.php1,518 ▼2417.76 ▼0.68661.97 ▲52.6950.19 ▼7.39
Media Library /wp-admin/upload.php1,386 ▲44.24 ▲0.0497.22 ▼1.8642.03 ▲0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/conditional-taxonomy-option/public/partials/cto-acf-public-display.php
    • > /wp-content/plugins/conditional-taxonomy-option/admin/partials/cto-acf-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Add a new field in field group as taxonomy.), #2 (Turn on the *Conditional Logic* and select the Taxonomy Field, then you will find two options in dropdown: **"Taxononmy is equal to"** and **"Taxonomy is not equal to"**)
The official readme.txt is a good inspiration

conditional-taxonomy-option/cto-acf.php 85% from 13 tests

The main PHP script in "Conditional Taxonomy Option" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("conditional-taxonomy-option.php" instead of "cto-acf.php")

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
Everything looks great! No dangerous files found in this plugin247 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12117528184
JavaScript3145663
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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