84% tfo-graphviz

Code Review | TFO Graphviz

WordPress plugin TFO Graphviz scored84%from 54 tests.

About plugin

  • Plugin page: tfo-graphviz
  • Plugin version: 1.19
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2010
  • Latest release: Jun 24, 2019
  • Number of updates: 106
  • Update frequency: every 29.7 days
  • Top authors: chrisy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,752 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.01ms] Passed 4 tests

Server-side resources used by TFO Graphviz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.47 ▼1.77
Dashboard /wp-admin3.44 ▲0.1352.78 ▲0.08
Posts /wp-admin/edit.php3.55 ▲0.1951.08 ▲1.01
Add New Post /wp-admin/post-new.php6.02 ▲0.1391.77 ▼15.34
Media Library /wp-admin/upload.php3.36 ▲0.1341.08 ▲2.29
TFO Graphviz /wp-admin/options-general.php?page=tfo-graphviz3.4035.85

Server storage [IO: ▲1.64MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/tfo-graphviz/" and "wp-content/uploads/"
    • (new file) wp-content/tfo-graphviz/.empty
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
tfo-graphviz
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TFO Graphviz
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.27 ▼0.311.75 ▲0.0443.74 ▲0.75
Dashboard /wp-admin2,202 ▲225.61 ▼0.0487.75 ▼0.8242.33 ▼0.49
Posts /wp-admin/edit.php2,104 ▲72.00 ▼0.0236.18 ▼0.0434.36 ▼0.97
Add New Post /wp-admin/post-new.php1,529 ▲323.70 ▲0.54686.43 ▲52.6558.34 ▲0.86
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0799.54 ▼3.6943.69 ▼6.79
TFO Graphviz /wp-admin/options-general.php?page=tfo-graphviz9594.6057.5862.32

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • tfo-graphviz

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tfo-graphviz
    • > Notice in wp-content/plugins/tfo-graphviz/tfo-graphviz-admin.php+343
    Undefined index: TFO_Graphviz_Graphviz

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can take inspiration from this readme.txt

tfo-graphviz/tfo-graphviz.php Passed 13 tests

"TFO Graphviz" version 1.19's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
Converts inline DOT code into an image, with optional image map, using Graphviz.

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
Good job! No executable or dangerous file extensions detected3,522 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4618,4952,602
PHP6259383895
CSS15125

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 complexity28.33
▷ Minimum class complexity3.00
▷ Maximum class complexity62.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin