84% rest-console-embed

Code Review | REST Console Embed

WordPress plugin REST Console Embed scored84%from 54 tests.

About plugin

  • Plugin page: rest-console-embed
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.1
  • WordPress version: 6.3.1
  • First release: May 5, 2015
  • Latest release: May 5, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: jeffstieler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,186 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by REST Console Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.67 ▼5.20
Dashboard /wp-admin3.31 ▼0.0346.23 ▼16.60
Posts /wp-admin/edit.php3.36 ▲0.0145.91 ▼3.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.47 ▼12.35
Media Library /wp-admin/upload.php3.24 ▲0.0138.72 ▲3.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

REST Console Embed: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.35 ▼0.201.75 ▼0.1743.49 ▼0.99
Dashboard /wp-admin2,198 ▲245.62 ▲0.0181.00 ▼11.2439.91 ▼3.49
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.1139.19 ▲3.2335.56 ▲0.41
Add New Post /wp-admin/post-new.php1,526 ▼523.10 ▼0.04667.31 ▲12.9851.40 ▲3.21
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0495.70 ▼8.6641.18 ▼4.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rest-console-embed/rest-console-embed.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


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:
  • Screenshots: Screenshot #1 (REST Console embedded in a post.) image not found
You can look at the official readme.txt

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

The main PHP file in "REST Console Embed" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

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
Success! There were no dangerous files found in this plugin1,488 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
17 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
console/res/close-dark.png0.34KB0.16KB▼ 52.29%
console/res/disclosure-dark.png0.38KB0.18KB▼ 51.55%
screenshot-1.png39.16KB8.84KB▼ 77.42%
console/res/disclosure-@2x.png0.38KB0.21KB▼ 44.92%
console/res/return-@2x.png0.49KB0.27KB▼ 43.46%