84% raml-console

Code Review | RAML Console

WordPress plugin RAML Console scored84%from 54 tests.

About plugin

  • Plugin page: raml-console
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-4.7.2
  • WordPress version: 6.3.1
  • First release: May 16, 2017
  • Latest release: May 17, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: djuang1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 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.01MB] [CPU: ▼12.17ms] Passed 4 tests

Server-side resources used by RAML Console
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.83 ▲3.71
Dashboard /wp-admin3.33 ▼0.0247.02 ▼21.77
Posts /wp-admin/edit.php3.38 ▲0.0250.54 ▼3.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.75 ▼21.77
Media Library /wp-admin/upload.php3.25 ▲0.0236.63 ▼1.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

RAML Console: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.25 ▼0.062.13 ▲0.0047.35 ▲9.04
Dashboard /wp-admin2,195 ▲185.64 ▼0.0485.50 ▼1.4441.62 ▼1.81
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0936.36 ▼0.7035.09 ▼2.54
Add New Post /wp-admin/post-new.php1,545 ▲1923.10 ▲5.34630.50 ▼71.3049.16 ▼4.92
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.0499.17 ▼11.4241.90 ▼5.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/raml-console/tempate-page-fullwidth.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/raml-console/raml-console.php:48

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: mulesoft, console, api, raml, api design

raml-console/raml-console.php Passed 13 tests

Analyzing the main PHP file in "RAML Console" version 1.0
69 characters long description:
This plugin allows you to embedd a RAML Console in your post or page.

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
Good job! No executable or dangerous file extensions detected59,458 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript38,45120,99151,317
CSS21,4735877,962
PHP294113125
HTML24040
Markdown15014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.99MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png5.04KB2.30KB▼ 54.33%
assets/screenshot-1.png180.87KB51.39KB▼ 71.59%
assets/screenshot-3.png71.38KB23.55KB▼ 67.01%
assets/icon-256x256.png5.04KB2.30KB▼ 54.33%
img/mulesoft-icon.png3.01KB1.80KB▼ 40.24%