84% gp-new-window-for-external-links

Code Review | GP New Window for External Links

WordPress plugin GP New Window for External Links scored84%from 54 tests.

About plugin

  • Plugin page: gp-new-window-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2015
  • Latest release: Apr 17, 2023
  • Number of updates: 18
  • Update frequency: every 148.8 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by GP New Window for External Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.11 ▲2.34
Dashboard /wp-admin3.32 ▼0.0344.53 ▼17.56
Posts /wp-admin/edit.php3.37 ▲0.0144.32 ▼3.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.76 ▼4.60
Media Library /wp-admin/upload.php3.24 ▲0.0136.96 ▲3.14

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for GP New Window for External Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.521.74 ▲0.0244.59 ▲1.20
Dashboard /wp-admin2,206 ▲185.83 ▲0.96108.09 ▲0.8839.41 ▼5.90
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0538.96 ▲3.3935.38 ▲4.57
Add New Post /wp-admin/post-new.php1,535 ▲2123.24 ▲5.46783.83 ▲161.0553.77 ▲8.20
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.01102.40 ▲8.4747.51 ▲2.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-new-window-for-external-links/new-window-for-external-links.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: glotpress, translation

gp-new-window-for-external-links/new-window-for-external-links.php 92% from 13 tests

"GP New Window for External Links" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gp-new-window-for-external-links.php" instead of "new-window-for-external-links.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin29 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121320
JavaScript1109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin