94% safe-links-to-posts

Code Review | Safe Links

WordPress plugin Safe Links scored 94% from 54 tests.

About plugin

  • Plugin page: safe-links-to-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.0
  • WordPress version: 5.8.1
  • First release: May 30, 2016
  • Latest release: Feb 14, 2019
  • Number of updates: 9
  • Update frequency: every 110.7 days
  • Top authors: thekrotek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 871 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼148.49ms] Passed 4 tests

An overview of server-side resources used by Safe Links
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1433.48 ▲12.61
Dashboard /wp-admin3.09 ▲0.0432.87 ▼16.63
Posts /wp-admin/edit.php3.15 ▲0.0446.01 ▲0.33
Add New Post /wp-admin/post-new.php5.45 ▲0.0286.55 ▼573.73
Media Library /wp-admin/upload.php3.04 ▲0.0327.44 ▼3.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Safe Links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.84 ▼0.108.46 ▼1.2945.43 ▼3.00
Dashboard /wp-admin2,967 ▲375.89 ▼0.24134.95 ▼20.91111.67 ▲1.17
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0060.30 ▼3.6391.95 ▼1.67
Add New Post /wp-admin/post-new.php1,883 ▲20019.21 ▲0.44370.60 ▲14.51104.04 ▼13.50
Media Library /wp-admin/upload.php1,810 ▲35.05 ▲0.05145.77 ▼2.43117.78 ▼2.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/safe-links-to-posts/safe-links.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: sef urls, seo, sef links

safe-links-to-posts/safe-links.php 85% from 13 tests

The principal PHP file in "Safe Links" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("safe-links-to-posts.php" instead of "safe-links.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1321294

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 files were detected