94% wp-open-files-in-new-window

Code Review | Open Files In New Window or Tab

WordPress plugin Open Files In New Window or Tab scored 94% from 54 tests.

About plugin

  • Plugin page: wp-open-files-in-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Oct 7, 2014
  • Latest release: Oct 8, 2014
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: abrudtkuhl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,308 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Open Files In New Window or Tab
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0131.50 ▼2.01
Dashboard /wp-admin3.06 ▲0.0141.18 ▲5.18
Posts /wp-admin/edit.php3.11 ▲0.0130.59 ▼12.12
Add New Post /wp-admin/post-new.php5.42 ▼0.0185.10 ▼678.32
Media Library /wp-admin/upload.php3.01 ▲0.0033.10 ▼2.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Open Files In New Window or Tab
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲21516.30 ▲0.9512.77 ▲4.1050.16 ▲3.76
Dashboard /wp-admin2,970 ▲335.84 ▼0.14137.47 ▼20.72109.94 ▼5.67
Posts /wp-admin/edit.php2,736 ▼32.70 ▼0.0065.46 ▼2.0091.76 ▼0.49
Add New Post /wp-admin/post-new.php1,672 ▼1118.81 ▲0.08363.85 ▼5.86111.44 ▼1.63
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02154.85 ▲6.98119.87 ▲3.23

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-open-files-in-new-window/wp-open-files-new-window.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-open-files-in-new-window === )
The official readme.txt might help

wp-open-files-in-new-window/wp-open-files-new-window.php 92% from 13 tests

The main file in "Open Files In New Window or Tab" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("wp-open-files-in-new-window.php" instead of "wp-open-files-new-window.php")

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
There were no executable files found in this plugin17 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1289
JavaScript1025
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin