84% plantuml-renderer

Code Review | PlantUML Renderer

WordPress plugin PlantUML Renderer scored84%from 54 tests.

About plugin

  • Plugin page: plantuml-renderer
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: Nov 21, 2017
  • Number of updates: 7
  • Update frequency: every 28.7 days
  • Top authors: toddhalfpenny (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /2,424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.61ms] Passed 4 tests

An overview of server-side resources used by PlantUML Renderer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.82 ▲4.47
Dashboard /wp-admin3.37 ▲0.0252.81 ▼15.04
Posts /wp-admin/edit.php3.48 ▲0.1250.30 ▼7.55
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.10 ▼20.20
Media Library /wp-admin/upload.php3.29 ▲0.0639.90 ▲4.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PlantUML Renderer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.83 ▼0.528.61 ▲6.8538.75 ▼0.51
Dashboard /wp-admin2,202 ▲255.61 ▼0.0490.94 ▲4.9940.21 ▲0.88
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0138.59 ▼3.9934.14 ▼4.27
Add New Post /wp-admin/post-new.php1,532 ▲623.55 ▲0.55635.98 ▲0.8852.74 ▲1.21
Media Library /wp-admin/upload.php1,404 ▲74.20 ▲0.02111.30 ▲8.3648.09 ▲5.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/plantuml-renderer/public/partials/plantuml-renderer-public-display.php
    • > /wp-content/plugins/plantuml-renderer/admin/partials/plantuml-renderer-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: plantuml, diagram, shortcode

plantuml-renderer/plantuml-renderer.php Passed 13 tests

The main file in "PlantUML Renderer" v. 0.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
Insert PlantUML diagrams

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin253 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12113567247
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods1967.86%
▷ Protected methods00.00%
▷ Private methods932.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin