72% wp-soavis

Code Review | WP SoaVis

WordPress plugin WP SoaVis scored 72% from 54 tests.

About plugin

  • Plugin page: wp-soavis
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.0
  • WordPress version: 5.8.1
  • First release: Feb 11, 2015
  • Latest release: Apr 27, 2020
  • Number of updates: 21
  • Update frequency: every 90.6 days
  • Top authors: DeBAAT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼139.15ms] Passed 4 tests

Analyzing server-side resources used by WP SoaVis
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1534.11 ▲5.20
Dashboard /wp-admin3.08 ▲0.0250.57 ▲2.20
Posts /wp-admin/edit.php3.15 ▲0.0449.24 ▼2.85
Add New Post /wp-admin/post-new.php5.43 ▼0.0098.02 ▼553.48
Media Library /wp-admin/upload.php3.02 ▲0.0135.28 ▼2.45
SoaVis Chains /wp-admin/edit.php?post_type=soavis_chain2.8428.42
SoaVis Projects /wp-admin/edit.php?post_type=soavis_project2.8423.03
SoaVis Shortcodes /wp-admin/admin.php?page=wp-soavis_shortcodes2.7625.61
SoaVis Systems /wp-admin/edit.php?post_type=soavis_system2.8422.58
SoaVis Services /wp-admin/edit.php?post_type=soavis_service2.8427.10
SoaVis Components /wp-admin/edit.php?post_type=soavis_component2.8432.24
SoaVis Settings /wp-admin/admin.php?page=wp-soavis_settings2.7629.10

Server storage [IO: ▲0.52MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 2 new options
New WordPress options
wp-soavis-rewrite-rules-version
wp-soavis-options

Browser metrics Passed 4 tests

A check of browser resources used by WP SoaVis
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲21716.18 ▲0.6710.73 ▲2.8549.11 ▼1.14
Dashboard /wp-admin2,973 ▲425.85 ▼0.08152.96 ▲4.39113.30 ▼3.07
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0069.63 ▲2.9897.01 ▲6.79
Add New Post /wp-admin/post-new.php1,591 ▼9218.79 ▲0.66381.57 ▼22.96120.50 ▲3.28
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.00164.84 ▼1.59123.45 ▼1.70
SoaVis Chains /wp-admin/edit.php?post_type=soavis_chain280.900.0511.11
SoaVis Projects /wp-admin/edit.php?post_type=soavis_project280.900.049.96
SoaVis Shortcodes /wp-admin/admin.php?page=wp-soavis_shortcodes280.900.0512.53
SoaVis Systems /wp-admin/edit.php?post_type=soavis_system280.900.0710.06
SoaVis Services /wp-admin/edit.php?post_type=soavis_service280.900.0511.28
SoaVis Components /wp-admin/edit.php?post_type=soavis_component280.900.099.77
SoaVis Settings /wp-admin/admin.php?page=wp-soavis_settings280.900.0512.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • wp-soavis-options
    • wp-soavis-rewrite-rules-version

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-soavis/includes/class-wp-soavis-graphviz.php
    • > /wp-content/plugins/wp-soavis/includes/class-wp-soavis-post-types.php
    • > /wp-content/plugins/wp-soavis/public/partials/wp-soavis-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'DebugMyPluginPanel' not found in wp-content/plugins/wp-soavis/includes/class.dmppanels.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-soavis/includes/wp-soavis-functions.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-soavis/admin/partials/wp-soavis-admin-display.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=soavis_chain
    • > Network (severe)
    wp-admin/edit.php?post_type=soavis_chain - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=soavis_project
    • > Network (severe)
    wp-admin/edit.php?post_type=soavis_project - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wp-soavis_shortcodes
    • > Network (severe)
    wp-admin/admin.php?page=wp-soavis_shortcodes - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=soavis_system
    • > Network (severe)
    wp-admin/edit.php?post_type=soavis_system - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=soavis_service
    • > Network (severe)
    wp-admin/edit.php?post_type=soavis_service - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=soavis_component
    • > Network (severe)
    wp-admin/edit.php?post_type=soavis_component - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wp-soavis_settings
    • > Network (severe)
    wp-admin/admin.php?page=wp-soavis_settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-soavis === )
  • Screenshots: These screenshots require images: #1 (The SoaVis Services sub menu page shows an overview of a number of services defined as soavis_service post_type.), #2 (The SoaVis Systems sub menu page shows an overview of a number of systems defined as soavis_system post_type.), #3 (The SoaVis Shortcode sub menu page shows an overview of the SoaVis shortcodes, including the parameters accepted.), #4 (A SoaVis Service can be edited like any other post. A drop down has been added to ease the use of SaoVis shortcodes.), #5 (A service post on the front end shows a SoaVis graph example.), #6 (A system post on the front end showing a different SoaVis graph.)
The official readme.txt might help

wp-soavis/wp-soavis.php Passed 13 tests

The main file in "WP SoaVis" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
61 characters long description:
A plugin to provide SoaVis functionality for WordPress sites.

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
Success! There were no dangerous files found in this plugin2,516 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP195951,5482,067
PO File1104248254
CSS2421189
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.08
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods125
▷ Static methods43.20%
▷ Public methods9777.60%
▷ Protected methods2016.00%
▷ Private methods86.40%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants36100.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
6 PNG files occupy 0.32MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png56.00KB31.80KB▼ 43.21%
screenshot-6.png43.79KB22.92KB▼ 47.67%
screenshot-2.png48.44KB27.80KB▼ 42.61%
screenshot-5.png41.42KB21.97KB▼ 46.96%
screenshot-4.png70.39KB39.52KB▼ 43.86%