78% remove-links-and-scripts

Code Review | Remove Links and Scripts

WordPress plugin Remove Links and Scripts scored78%from 54 tests.

About plugin

  • Plugin page: remove-links-and-...
  • Plugin version: 0.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Jan 26, 2018
  • Number of updates: 26
  • Update frequency: every 23.0 days
  • Top authors: sasiddiqui (96.15%)aliya yasir (7.69%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Remove Links and Scripts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.23 ▼12.61
Dashboard /wp-admin3.34 ▲0.0446.28 ▼5.24
Posts /wp-admin/edit.php3.39 ▲0.0350.31 ▲2.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.97 ▼0.78
Media Library /wp-admin/upload.php3.26 ▲0.0337.09 ▲2.35
Settings /wp-admin/admin.php?page=remove-links-scripts-settings3.2731.68
About /wp-admin/admin.php?page=remove-links-scripts-about-plugins3.2529.01

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Remove Links and Scripts: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.32 ▼0.944.24 ▲1.8041.15 ▼3.24
Dashboard /wp-admin2,236 ▲455.79 ▼0.1196.56 ▼7.1440.77 ▼6.08
Posts /wp-admin/edit.php2,119 ▲301.99 ▲0.0239.64 ▲4.4538.78 ▼2.30
Add New Post /wp-admin/post-new.php1,564 ▲5018.28 ▲0.76630.91 ▼60.4348.83 ▼3.77
Media Library /wp-admin/upload.php1,418 ▲304.24 ▲0.0595.32 ▼14.7641.17 ▼7.96
Settings /wp-admin/admin.php?page=remove-links-scripts-settings9102.0624.4422.22
About /wp-admin/admin.php?page=remove-links-scripts-about-plugins2,4751.9526.0244.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=remove-links-scripts-settings
    • > Notice in wp-content/plugins/remove-links-and-scripts/admin/class-remove-links-scripts-settings.php+113
    Trying to access array offset on value of type bool

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× PHP files output text when accessed directly:
    • > /wp-content/plugins/remove-links-and-scripts/remove-links-scripts.php
    • > /wp-content/plugins/remove-links-and-scripts/remove-links-scripts-main.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #1 in remove-links-and-scripts/assets to your readme.txt
The official readme.txt is a good inspiration

remove-links-and-scripts/remove-links-scripts.php 92% from 13 tests

The primary PHP file in "Remove Links and Scripts" version 0.2.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("remove-links-and-scripts.php" instead of "remove-links-scripts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin8,799 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG9118,119
PHP77996452
CSS420228

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/prevent-xss-vulnerability.png7.36KB7.25KB▼ 1.51%
admin/images/media-post-permalink.png24.03KB11.56KB▼ 51.92%