90% preserve-taxonomy-hierarchy

Code Review | Preserve Taxonomy Hierarchy

WordPress plugin Preserve Taxonomy Hierarchy scored90%from 54 tests.

About plugin

  • Plugin page: preserve-taxonomy...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 15, 2020
  • Latest release: May 20, 2023
  • Number of updates: 14
  • Update frequency: every 63.3 days
  • Top authors: aminnz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,123 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.30ms] Passed 4 tests

A check of server-side resources used by Preserve Taxonomy Hierarchy
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.45 ▲0.67
Dashboard /wp-admin3.33 ▲0.0248.54 ▼3.03
Posts /wp-admin/edit.php3.38 ▲0.0243.87 ▼6.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.59 ▼8.04
Media Library /wp-admin/upload.php3.25 ▲0.0240.08 ▲3.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Preserve Taxonomy Hierarchy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.36 ▲0.011.84 ▼0.1243.88 ▲2.09
Dashboard /wp-admin2,195 ▲185.54 ▼0.0397.81 ▲3.8542.23 ▲3.32
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0236.97 ▲1.0534.44 ▼1.43
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▲0.10664.25 ▼6.7561.04 ▲7.41
Media Library /wp-admin/upload.php1,400 ▼04.10 ▲0.01111.70 ▲7.3144.32 ▼2.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: hierarchy, taxonomy hierarchy, post category, nav menu, taxonomy...

preserve-taxonomy-hierarchy/index.php 92% from 13 tests

This is the main PHP file of "Preserve Taxonomy Hierarchy" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("preserve-taxonomy-hierarchy.php" instead of "index.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
Success! There were no dangerous files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2301090

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin