10% external-link-gate

Code Review | External Link Gate

WordPress plugin External Link Gate scored10%from 54 tests.

About plugin

  • Plugin page: external-link-gate
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: May 9, 2019
  • Number of updates: 3
  • Update frequency: every 6.7 days
  • Top authors: scubakyle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /461 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/external-link-gate/external-link-gate.php+20
    require_once(wp-content/plugins/external-link-gate/includes/classes/ExternalLinkgateSettings.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.75ms] Passed 4 tests

A check of server-side resources used by External Link Gate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.04 ▲0.12
Dashboard /wp-admin3.31 ▼0.0443.57 ▼14.66
Posts /wp-admin/edit.php3.36 ▲0.0040.80 ▼5.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.33 ▼14.77
Media Library /wp-admin/upload.php3.23 ▲0.0034.11 ▲2.18

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for External Link Gate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.211.92 ▲0.3244.03 ▲5.25
Dashboard /wp-admin2,189 ▲125.51 ▼0.1783.77 ▼2.5336.33 ▼9.24
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0633.13 ▼5.2033.28 ▼2.84
Add New Post /wp-admin/post-new.php1,526 ▼223.30 ▲0.14675.23 ▲4.2750.63 ▲2.07
Media Library /wp-admin/upload.php1,400 ▼04.30 ▲0.1194.48 ▼2.0242.27 ▼0.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function elg_get_options() in wp-content/plugins/external-link-gate/includes/templates/modal.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/external-link-gate/external-link-gate.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: link-gate, accessible, modal

external-link-gate/external-link-gate.php Passed 13 tests

The main file in "External Link Gate" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
Create a warning for third party links

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
No dangerous file extensions were detected388 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP69377197
CSS1110116
JavaScript1563173
Markdown1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin