78% rest-api-link-manager

Code Review | REST API Link Manager

WordPress plugin REST API Link Manager scored78%from 54 tests.

About plugin

  • Plugin page: rest-api-link-man...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2016
  • Latest release: Mar 7, 2016
  • Number of updates: 28
  • Update frequency: every 0.0 days
  • Top authors: JPry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.61MB] [CPU: ▼15.89ms] Passed 4 tests

A check of server-side resources used by REST API Link Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.45 ▼5.29
Dashboard /wp-admin3.31 ▲0.0151.29 ▲4.57
Posts /wp-admin/edit.php3.36 ▲0.0144.61 ▼2.21
Add New Post /wp-admin/post-new.php3.41 ▼2.4735.89 ▼55.80
Media Library /wp-admin/upload.php3.23 ▲0.0034.37 ▼0.24

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

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

Browser metrics Passed 4 tests

REST API Link Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.44 ▼0.211.97 ▲0.0244.22 ▲1.61
Dashboard /wp-admin2,206 ▲155.77 ▲0.86114.08 ▲2.7644.70 ▼4.78
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0434.32 ▼1.2236.10 ▲0.57
Add New Post /wp-admin/post-new.php1,542 ▼018.39 ▲0.10627.41 ▼19.8159.66 ▲9.86
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.04101.09 ▼5.9243.80 ▲2.33

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

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rest-api-link-manager/rest-api-link-manager.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api-link-manager/includes/class-jpry-rest-link-controller.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === rest-api-link-manager === )
Please take inspiration from this readme.txt

rest-api-link-manager/rest-api-link-manager.php Passed 13 tests

"REST API Link Manager" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
49 characters long description:
Add endpoints for managing links to the REST API.

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
Success! There were no dangerous files found in this plugin673 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2108284609
JSON10031
JavaScript181131
Markdown1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1875.00%
▷ Protected methods625.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin