84% rest-api-broker

Code Review | WordPress REST API - Authentication Broker

WordPress plugin WordPress REST API - Authentication Broker scored84%from 54 tests.

About plugin

  • Plugin page: rest-api-broker
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Oct 6, 2016
  • Latest release: Oct 6, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: joehoyle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,893 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WordPress REST API - Authentication Broker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0067.19 ▼9.76
Dashboard /wp-admin3.31 ▲0.0082.78 ▼13.81
Posts /wp-admin/edit.php3.36 ▲0.0079.27 ▼13.30
Add New Post /wp-admin/post-new.php5.89 ▲0.00169.12 ▲16.93
Media Library /wp-admin/upload.php3.23 ▲0.0064.05 ▼13.93

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

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

Browser metrics Passed 4 tests

WordPress REST API - Authentication Broker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.27 ▲0.333.56 ▼0.3076.17 ▼4.00
Dashboard /wp-admin2,200 ▲185.88 ▲0.96171.90 ▼12.1986.38 ▲10.27
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0363.95 ▼5.3576.07 ▲2.70
Add New Post /wp-admin/post-new.php1,415 ▲5617.77 ▼0.01946.58 ▼77.2472.27 ▼7.40
Media Library /wp-admin/upload.php1,382 ▼34.18 ▲0.03174.55 ▼19.8897.56 ▲2.93

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
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/rest-api-broker/plugin.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tested up to: Invalid version format
The official readme.txt might help

rest-api-broker/plugin.php 92% from 13 tests

Analyzing the main PHP file in "WordPress REST API - Authentication Broker" version 0.1.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("rest-api-broker.php" instead of "plugin.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
There were no executable files found in this plugin169 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22728161
Markdown1708

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ 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 files were detected