84% get-by-taxonomycategory-parent-for-wp-rest-api

Code Review | Get by taxonomy/category parent for WP REST API

WordPress plugin Get by taxonomy/category parent for WP REST API scored84%from 54 tests.

About plugin

  • Plugin page: get-by-taxonomyca...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Mar 11, 2021
  • Number of updates: 3
  • Update frequency: every 15.0 days
  • Top authors: mmediagroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.68ms] Passed 4 tests

Analyzing server-side resources used by Get by taxonomy/category parent for WP REST API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.09 ▼0.28
Dashboard /wp-admin3.31 ▼0.0346.04 ▼15.74
Posts /wp-admin/edit.php3.36 ▲0.0043.14 ▼3.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.98 ▼14.78
Media Library /wp-admin/upload.php3.23 ▲0.0031.98 ▼0.51

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get by taxonomy/category parent for WP REST API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.40 ▼0.281.86 ▲0.0643.64 ▼0.44
Dashboard /wp-admin2,206 ▲185.85 ▼0.05102.19 ▼13.7039.25 ▼3.65
Posts /wp-admin/edit.php2,092 ▲32.09 ▲0.1239.62 ▲1.9734.67 ▲1.59
Add New Post /wp-admin/post-new.php1,537 ▲1823.37 ▼0.00664.44 ▼19.5865.04 ▲5.58
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0296.62 ▼12.1141.44 ▼3.86

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/get-by-taxonomycategory-parent-for-wp-rest-api/WPRestApiByParentCat.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: rest-api, wp-api, api

get-by-taxonomycategory-parent-for-wp-rest-api/WPRestApiByParentCat.php 92% from 13 tests

"Get by taxonomy/category parent for WP REST API" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("get-by-taxonomycategory-parent-for-wp-rest-api.php" instead of "WPRestApiByParentCat.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
Good job! No executable or dangerous file extensions detected21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected