78% open-in-new-tab-internal-link

Code Review | Open In New Tab Internal Link

WordPress plugin Open In New Tab Internal Link scored 78% from 54 tests.

About plugin

  • Plugin page: open-in-new-tab-i...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Jun 23, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: evilperry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.40ms] Passed 4 tests

A check of server-side resources used by Open In New Tab Internal Link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.48 ▲5.77
Dashboard /wp-admin3.37 ▲0.0746.46 ▼5.84
Posts /wp-admin/edit.php3.48 ▲0.1243.33 ▼8.28
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.91 ▼4.59
Media Library /wp-admin/upload.php3.29 ▲0.0637.85 ▲1.11
Open In New Tab Internal Link /wp-admin/options-general.php?page=ndh-ointil3.2631.69

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Open In New Tab Internal Link
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.53 ▼0.538.46 ▲6.6743.59 ▲4.44
Dashboard /wp-admin2,214 ▲254.81 ▼0.04104.13 ▼17.1438.62 ▼7.08
Posts /wp-admin/edit.php2,076 ▲82.01 ▼0.0034.61 ▼1.9031.32 ▼0.88
Add New Post /wp-admin/post-new.php1,531 ▲318.21 ▲0.02600.03 ▼57.5198.90 ▲33.62
Media Library /wp-admin/upload.php1,399 ▲204.24 ▼0.0197.90 ▼4.4043.49 ▼1.56
Open In New Tab Internal Link /wp-admin/options-general.php?page=ndh-ointil7702.0626.1623.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/open-in-new-tab-internal-link/public/partials/ndh-ointil-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/open-in-new-tab-internal-link/admin/partials/ndh-ointil-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Admin settings on the Settings -> Open In New Tab Internal Link.), #2 (Go to Settings -> Open In New Tab Internal Link -> check Active -> Save all changes)
You can look at the official readme.txt

open-in-new-tab-internal-link/ndh-ointil.php 85% from 13 tests

The main PHP file in "Open In New Tab Internal Link" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("open-in-new-tab-internal-link.php" instead of "ndh-ointil.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected245 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160567239
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin