84% json-rest-api-wp-api-categories-and-tags

Code Review | JSON REST API (WP API) Categories and Tags

WordPress plugin JSON REST API (WP API) Categories and Tags scored84%from 54 tests.

About plugin

  • Plugin page: json-rest-api-wp-...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2014
  • Latest release: Sep 20, 2014
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: WizADSL (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /6,237 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.00MB] [CPU: ▼5.43ms] Passed 4 tests

A check of server-side resources used by JSON REST API (WP API) Categories and Tags
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.82 ▼1.00
Dashboard /wp-admin3.31 ▲0.0044.23 ▼9.86
Posts /wp-admin/edit.php3.36 ▲0.0052.74 ▲7.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.66 ▼10.05
Media Library /wp-admin/upload.php3.23 ▲0.0034.87 ▼0.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for JSON REST API (WP API) Categories and Tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.102.18 ▲0.4845.78 ▲1.39
Dashboard /wp-admin2,206 ▲185.91 ▲1.02107.05 ▼10.6937.83 ▼9.18
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0239.62 ▲1.6034.39 ▼0.92
Add New Post /wp-admin/post-new.php1,539 ▲423.18 ▼0.15643.82 ▼38.4652.30 ▼6.90
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0595.54 ▼9.9240.68 ▼2.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/json-rest-api-wp-api-categories-and-tags/json-rest-api-patch.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: rest, patch, rest-api, json, api

json-rest-api-wp-api-categories-and-tags/json-rest-api-patch.php 92% from 13 tests

The main file in "JSON REST API (WP API) Categories and Tags" v. 1.01 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("json-rest-api-wp-api-categories-and-tags.php" instead of "json-rest-api-patch.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14821

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.75
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

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