83% wp-graphviz

Code Review | WP-GraphViz

WordPress plugin WP-GraphViz scored83%from 54 tests.

About plugin

  • Plugin page: wp-graphviz
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2013
  • Latest release: Jul 23, 2023
  • Number of updates: 21
  • Update frequency: every 172.1 days
  • Top authors: DeBAAT (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,631 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▲6.78ms] Passed 4 tests

Server-side resources used by WP-GraphViz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1155.40 ▲14.77
Dashboard /wp-admin3.41 ▲0.1060.29 ▲7.22
Posts /wp-admin/edit.php3.52 ▲0.1660.89 ▲12.94
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.81 ▲4.39
Media Library /wp-admin/upload.php3.33 ▲0.1039.43 ▲2.56

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WP-GraphViz: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.33 ▼0.032.14 ▲0.5543.41 ▼5.41
Dashboard /wp-admin2,215 ▲355.56 ▼0.0688.34 ▼6.7282.16 ▲37.41
Posts /wp-admin/edit.php2,123 ▲232.01 ▲0.0739.22 ▼1.0435.28 ▼7.18
Add New Post /wp-admin/post-new.php1,541 ▲423.65 ▲5.60708.46 ▲90.6251.41 ▼27.76
Media Library /wp-admin/upload.php1,417 ▲234.11 ▼0.04100.15 ▼6.4179.26 ▲34.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-graphviz/views/admin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'DebugMyPluginPanel' not found in wp-content/plugins/wp-graphviz/classes/class.dmppanels.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-graphviz/classes/class-wp-graphviz-shortcodes.php:355

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` (or jpg, jpeg, gif).), #2 (This is the second screen shot)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-graphviz === )
You can take inspiration from this readme.txt

wp-graphviz/wp-graphviz.php 92% from 13 tests

"WP-GraphViz" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,748 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript237201,161
PHP7106290427
CSS191182
PO File1296478

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.25
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
7 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.98KB12.32KB▼ 55.96%
assets/icon-wp-graphviz-32.png0.74KB0.54KB▼ 27.54%
assets/icon-wp-graphviz-18.png0.61KB0.79KB0.00%
assets/banner-1544x500.png23.10KB9.63KB▼ 58.33%
assets/icon-128x128.png6.76KB6.58KB▼ 2.53%