94% vectr-embedded-graphics-editor

Code Review | Vectr - Embedded Graphics Editor

WordPress plugin Vectr - Embedded Graphics Editor scored 94% from 54 tests.

About plugin

  • Plugin page: vectr-embedded-gr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Feb 6, 2017
  • Latest release: Feb 6, 2017
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: vectr (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active / 9,037 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼173.95ms] Passed 4 tests

An overview of server-side resources used by Vectr - Embedded Graphics Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0042.38 ▲1.77
Dashboard /wp-admin3.06 ▲0.0144.00 ▼10.55
Posts /wp-admin/edit.php3.12 ▲0.0144.42 ▲1.43
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.96 ▼685.68
Media Library /wp-admin/upload.php3.00 ▲0.0035.22 ▼0.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vectr - Embedded Graphics Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.91 ▲0.448.39 ▼1.0547.88 ▼2.30
Dashboard /wp-admin2,967 ▲335.85 ▼0.08139.52 ▼13.81108.28 ▼9.58
Posts /wp-admin/edit.php2,782 ▲462.95 ▲0.2576.04 ▲4.72108.28 ▲12.41
Add New Post /wp-admin/post-new.php1,647 ▼3621.69 ▲3.32288.49 ▼95.56147.15 ▲36.76
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.03159.10 ▼6.09129.98 ▲3.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/vectr-embedded-graphics-editor/Vectr.php:11

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
Please take inspiration from this readme.txt

vectr-embedded-graphics-editor/Vectr.php 92% from 13 tests

Analyzing the main PHP file in "Vectr - Embedded Graphics Editor" version 1.0.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vectr-embedded-graphics-editor.php" instead of "Vectr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin522 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28636399
CSS21085
PHP19836
Markdown1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png0.39KB0.24KB▼ 40.35%