93% vir2al-options

Code Review | vir2al options

WordPress plugin vir2al options scored 93% from 54 tests.

About plugin

  • Plugin page: vir2al-options
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 5.8.1
  • First release: May 16, 2015
  • Latest release: Jun 2, 2016
  • Number of updates: 11
  • Update frequency: every 34.8 days
  • Top authors: nico_martin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 608 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼144.26ms] Passed 4 tests

Server-side resources used by vir2al options
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0341.48 ▲4.16
Dashboard /wp-admin3.11 ▲0.0657.60 ▲11.82
Posts /wp-admin/edit.php3.22 ▲0.1253.57 ▲0.26
Add New Post /wp-admin/post-new.php5.45 ▲0.0195.33 ▼585.71
Media Library /wp-admin/upload.php3.03 ▲0.0339.82 ▲4.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for vir2al options
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,923 ▲32717.93 ▲2.189.33 ▲0.2444.95 ▼8.28
Dashboard /wp-admin3,190 ▲2598.31 ▲2.11177.03 ▲8.32107.50 ▼12.03
Posts /wp-admin/edit.php2,988 ▲2494.38 ▲1.6694.10 ▲26.5596.76 ▼14.31
Add New Post /wp-admin/post-new.php1,636 ▼4721.20 ▲2.52270.77 ▼104.66134.22 ▲19.32
Media Library /wp-admin/upload.php1,834 ▲274.90 ▼0.14130.25 ▼36.54123.65 ▼21.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vir2al-options/vir2al_options.php:33

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: options

vir2al-options/vir2al_options.php 77% from 13 tests

The main file in "vir2al options" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("vir2al-options.php" instead of "vir2al_options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected339 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15561259
CSS117080

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.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
default_img.png8.48KB5.21KB▼ 38.54%
img/save.png0.30KB0.30KB0.32%