84% rest-api-console

Code Review | REST API Console

WordPress plugin REST API Console scored84%from 54 tests.

About plugin

  • Plugin page: rest-api-console
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.4
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: Nov 30, 2016
  • Number of updates: 9
  • Update frequency: every 61.6 days
  • Top authors: rmccue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.60ms] Passed 4 tests

Server-side resources used by REST API Console
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.46 ▲1.01
Dashboard /wp-admin3.32 ▲0.0248.88 ▼2.63
Posts /wp-admin/edit.php3.37 ▲0.0152.57 ▼1.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.72 ▼19.51
Media Library /wp-admin/upload.php3.24 ▲0.0145.89 ▲5.94
REST API Console /wp-admin/tools.php?page=rest_api_console3.2233.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for REST API Console
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.19 ▼0.181.81 ▲0.1144.53 ▲4.95
Dashboard /wp-admin2,196 ▲225.54 ▲0.0089.33 ▼3.0340.03 ▲3.72
Posts /wp-admin/edit.php2,107 ▲102.02 ▼0.0039.29 ▲2.5634.65 ▼0.98
Add New Post /wp-admin/post-new.php1,537 ▲923.08 ▼0.11676.12 ▼3.6758.51 ▼12.84
Media Library /wp-admin/upload.php1,401 ▲44.26 ▲0.02100.44 ▼2.1640.59 ▼7.63
REST API Console /wp-admin/tools.php?page=rest_api_console5,2825.40106.0291.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/rest-api-console/rest-api-console.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/rest-api-console/templates/views/app.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: api-console, rest-api

rest-api-console/rest-api-console.php 92% from 13 tests

The principal PHP file in "REST API Console" v. 2.1 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 ("/language")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7,176 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript261,2495084,761
Sass325541,104
CSS234131,074
SVG100135
PHP2171182
Markdown115020

PHP code Passed 2 tests

Analyzing 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.15
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/close-@2x.png0.38KB0.19KB▼ 50.76%
res/return-@2x.png0.49KB0.27KB▼ 43.46%
res/search.png0.36KB0.25KB▼ 29.16%
res/close.png0.30KB0.16KB▼ 45.60%
res/disclosure-@2x.png0.38KB0.21KB▼ 44.92%