79% nusvg

Code Review | Nusvg

WordPress plugin Nusvg scored79%from 54 tests.

About plugin

  • Plugin page: nusvg
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.5-6.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2022
  • Latest release: Nov 24, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: nuw40 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /451 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
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.74ms] Passed 4 tests

Server-side resources used by Nusvg
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.94 ▼4.59
Dashboard /wp-admin3.45 ▲0.1448.67 ▼3.16
Posts /wp-admin/edit.php3.56 ▲0.2050.08 ▲4.19
Add New Post /wp-admin/post-new.php6.05 ▲0.1682.32 ▼9.83
Media Library /wp-admin/upload.php3.37 ▲0.1435.93 ▼1.38
nusvg /wp-admin/admin.php?page=nusvg3.3535.79
Credits /wp-admin/admin.php?page=nusvg-credits3.3432.31
/wp-admin/admin.php?page=nusvg-item3.3433.32
Uninstall /wp-admin/admin.php?page=nusvg-uninstall3.3432.78
Documentation /wp-admin/admin.php?page=nusvg-documentation3.4033.00
List /wp-admin/admin.php?page=nusvg-list3.3533.43
Troubleshooting /wp-admin/admin.php?page=nusvg-troubleshooting3.3431.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: 1 new table, 8 new options
New tables
wp_nusvg_items
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
nusvg_db_version
db_upgraded
widget_theysaidso_widget
nusvg_plugin_version
widget_recent-posts

Browser metrics Passed 4 tests

Nusvg: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12013.62 ▼1.001.53 ▼0.2137.44 ▼9.32
Dashboard /wp-admin2,269 ▲815.83 ▲0.9498.49 ▼18.5239.85 ▼2.60
Posts /wp-admin/edit.php2,155 ▲662.06 ▲0.0436.95 ▲0.7730.90 ▼2.46
Add New Post /wp-admin/post-new.php1,552 ▲3323.33 ▲0.04632.15 ▼38.0048.54 ▼10.40
Media Library /wp-admin/upload.php1,454 ▲664.32 ▲0.2296.57 ▼23.0745.30 ▼1.99
nusvg /wp-admin/admin.php?page=nusvg8852.0826.9226.12
Credits /wp-admin/admin.php?page=nusvg-credits8102.0723.8523.99
/wp-admin/admin.php?page=nusvg-item8242.0723.2921.08
Uninstall /wp-admin/admin.php?page=nusvg-uninstall8202.0424.3524.92
Documentation /wp-admin/admin.php?page=nusvg-documentation1,5972.0723.4650.38
List /wp-admin/admin.php?page=nusvg-list8842.0525.5923.00
Troubleshooting /wp-admin/admin.php?page=nusvg-troubleshooting8202.0724.5122.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nusvg/nusvg.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nusvg/classes/class-nusvg.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
1 plugin tags: svg

nusvg/nusvg.php Passed 13 tests

"Nusvg" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
11 characters long description:
SVG manager

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
Everything looks great! No dangerous files found in this plugin1,261 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13210321,016
PO File1117194159
CSS11081
JavaScript1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods55
▷ Static methods3156.36%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin