83% restless

Code Review | RESTless

WordPress plugin RESTless scored83%from 54 tests.

About plugin

  • Plugin page: restless
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 29, 2018
  • Latest release: Jun 29, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: BjornW (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 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: ▼9.35ms] Passed 4 tests

An overview of server-side resources used by RESTless
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.17 ▼8.44
Dashboard /wp-admin3.31 ▲0.0148.68 ▼3.88
Posts /wp-admin/edit.php3.37 ▲0.0050.72 ▼1.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0087.19 ▼22.09
Media Library /wp-admin/upload.php3.24 ▲0.0037.88 ▼2.99

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for RESTless
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.441.81 ▲0.0342.32 ▲1.57
Dashboard /wp-admin2,195 ▲145.67 ▼0.0385.58 ▼15.5838.37 ▼6.50
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0540.89 ▼1.4835.83 ▼4.06
Add New Post /wp-admin/post-new.php1,526 ▼223.22 ▲0.03689.19 ▲35.7554.22 ▼0.14
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0297.14 ▼8.7547.53 ▲2.59

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/restless/restless.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Message (in this case automagically translated in Dutch) shown to non-authenticated user of the REST AP upon this request https://domain.name/wp-json/wp/v2/users), #2 (Request shown to authenticated user of the REST API (example request was https://domain.name/wp-json/wp/v2/users))
  • Screenshots: These screenshots lack descriptions #0, #0 in restless/assets to your readme.txt
You can look at the official readme.txt

restless/restless.php 92% from 13 tests

The principal PHP file in "RESTless" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
Success! There were no dangerous files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112613

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
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
PNG images were not found in this plugin