83% wp-rest-api-pure-taxonomies

Code Review | WP REST API - Pure Taxonomies

WordPress plugin WP REST API - Pure Taxonomies scored83%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-pure-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Mar 1, 2016
  • Number of updates: 7
  • Update frequency: every 2.7 days
  • Top authors: MAGIKru (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /9,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.14ms] Passed 4 tests

This is a short check of server-side resources used by WP REST API - Pure Taxonomies
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.30 ▲1.55
Dashboard /wp-admin3.32 ▼0.0345.73 ▼13.44
Posts /wp-admin/edit.php3.37 ▲0.0142.64 ▼8.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.09 ▼16.26
Media Library /wp-admin/upload.php3.24 ▲0.0133.67 ▲3.61

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP REST API - Pure Taxonomies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.27 ▼0.111.74 ▲0.1646.58 ▲5.50
Dashboard /wp-admin2,203 ▲125.83 ▼0.06100.71 ▼2.7239.51 ▼2.93
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0234.78 ▼11.6534.04 ▼2.08
Add New Post /wp-admin/post-new.php1,544 ▲2418.36 ▼4.84638.11 ▼21.7150.61 ▲0.09
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.06100.43 ▲4.1345.98 ▲4.83

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-rest-api-pure-taxonomies/wp_api_pure_taxonomies.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-rest-api-pure-taxonomies === )
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-rest-api-pure-taxonomies/wp_api_pure_taxonomies.php 92% from 13 tests

The primary PHP file in "WP REST API - Pure Taxonomies" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-rest-api-pure-taxonomies.php" instead of "wp_api_pure_taxonomies.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171146

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity2.00
▷ Maximum method complexity6.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
No PNG files were detected