93% wp-rest-api-post-type-taxonomies

Code Review | WP REST API - Post Type Taxonomies

WordPress plugin WP REST API - Post Type Taxonomies scored 93% from 54 tests.

About plugin

  • Plugin page: wp-rest-api-post-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.1
  • WordPress version: 5.8.1
  • First release: Mar 1, 2016
  • Latest release: Mar 1, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: MAGIKru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,345 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.64MB] [CPU: ▼157.85ms] Passed 4 tests

Analyzing server-side resources used by WP REST API - Post Type Taxonomies
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.89 ▲17.88
Dashboard /wp-admin3.07 ▲0.0147.55 ▼0.89
Posts /wp-admin/edit.php3.12 ▲0.0144.83 ▼5.60
Add New Post /wp-admin/post-new.php2.85 ▼2.5824.85 ▼616.11
Media Library /wp-admin/upload.php3.01 ▼0.0033.92 ▼8.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP REST API - Post Type Taxonomies
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.85 ▼0.089.34 ▲0.5351.36 ▲0.32
Dashboard /wp-admin2,973 ▲425.91 ▼0.04143.87 ▼5.56114.54 ▼0.48
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0171.63 ▲4.3182.47 ▼16.64
Add New Post /wp-admin/post-new.php1,683 ▼018.71 ▼0.07393.91 ▼30.08111.77 ▼6.62
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.01167.85 ▲4.23124.42 ▼1.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 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 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-rest-api-post-type-taxonomies/wp_api_post_type_taxonomies.php:43

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-rest-api-post-type-taxonomies === )
You can take inspiration from this readme.txt

wp-rest-api-post-type-taxonomies/wp_api_post_type_taxonomies.php 92% from 13 tests

"WP REST API - Post Type Taxonomies" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-rest-api-post-type-taxonomies.php" instead of "wp_api_post_type_taxonomies.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15832

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin