84% link-shield

Code Review | Link Shield

WordPress plugin Link Shield scored84%from 54 tests.

About plugin

  • Plugin page: link-shield
  • Plugin version: 0.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2014
  • Latest release: Mar 22, 2015
  • Number of updates: 27
  • Update frequency: every 8.7 days
  • Top authors: j.conti (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

70+ active /3,816 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.06MB] [CPU: ▼7.14ms] Passed 4 tests

Server-side resources used by Link Shield
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.37 ▼0.82
Dashboard /wp-admin3.38 ▲0.0345.70 ▼14.56
Posts /wp-admin/edit.php3.43 ▲0.0748.06 ▼3.40
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.50 ▼9.62
Media Library /wp-admin/upload.php3.30 ▲0.0733.89 ▼0.98
Link Shield /wp-admin/options-general.php?page=link_shield_menu_options3.2731.47

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Link Shield
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.48 ▲0.071.74 ▼0.2142.88 ▲1.89
Dashboard /wp-admin2,210 ▲254.86 ▼1.04108.57 ▲7.8742.62 ▼3.12
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0339.69 ▼3.3835.95 ▲0.12
Add New Post /wp-admin/post-new.php1,536 ▲1523.28 ▼0.10607.87 ▼16.8047.18 ▼7.06
Media Library /wp-admin/upload.php1,395 ▲74.17 ▲0.02100.12 ▲0.3242.11 ▲0.31
Link Shield /wp-admin/options-general.php?page=link_shield_menu_options9252.0222.6528.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-shield/loader.php:189

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

link-shield/loader.php 92% from 13 tests

The main PHP file in "Link Shield" ver. 0.5.4 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: Please rename the main PHP file in this plugin to the plugin slug ("link-shield.php" instead of "loader.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
No dangerous file extensions were detected570 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP55842402
PO File2186547157
XML12011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions13
▷ Named functions13100.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
PNG images were not found in this plugin