88% views-output-formats

Code Review | Views Output Formats

WordPress plugin Views Output Formats scored 88% from 54 tests.

About plugin

  • Plugin page: views-output-formats
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 5.8.1
  • First release: Nov 17, 2013
  • Latest release: Jul 29, 2016
  • Number of updates: 9
  • Update frequency: every 109.7 days
  • Top authors: khromov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,749 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼149.19ms] Passed 4 tests

This is a short check of server-side resources used by Views Output Formats
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1723.61 ▲4.13
Dashboard /wp-admin3.11 ▲0.0431.58 ▼12.50
Posts /wp-admin/edit.php3.20 ▲0.0930.89 ▼2.98
Add New Post /wp-admin/post-new.php5.47 ▲0.0365.84 ▼580.70
Media Library /wp-admin/upload.php3.05 ▲0.0523.74 ▼0.59
Views Output Formats /wp-admin/options-general.php?page=vof3.0121.25

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 2 new options
New WordPress options
vof_secondary_token
vof_token

Browser metrics Passed 4 tests

Views Output Formats: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲6915.55 ▼0.075.48 ▲0.4976.18 ▼2.52
Dashboard /wp-admin2,938 ▲396.17 ▼0.02118.39 ▼21.20167.91 ▼6.84
Posts /wp-admin/edit.php2,748 ▲83.23 ▲0.0165.56 ▲0.63137.04 ▼4.14
Add New Post /wp-admin/post-new.php3,819 ▲8319.46 ▲0.72430.64 ▼67.96165.58 ▲1.74
Media Library /wp-admin/upload.php1,757 ▲55.50 ▲0.01140.80 ▼10.21187.10 ▲5.32
Views Output Formats /wp-admin/options-general.php?page=vof1,0612.4058.47110.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=vof
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=vof
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/views-output-formats/wp-views-output-formats.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: wp_query, json, views, xml, query

views-output-formats/wp-views-output-formats.php 92% from 13 tests

This is the main PHP file of "Views Output Formats" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("views-output-formats.php" instead of "wp-views-output-formats.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected222 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14772222

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.00
▷ Minimum class complexity6.00
▷ Maximum class complexity26.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods535.71%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin