84% sazx-hot-link-blocker

Code Review | Sazx Hotlink Blocker

WordPress plugin Sazx Hotlink Blocker scored84%from 54 tests.

About plugin

  • Plugin page: sazx-hot-link-blo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Nov 17, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: tinsaebelay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Sazx Hotlink Blocker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.18 ▼3.66
Dashboard /wp-admin3.32 ▲0.0141.60 ▼7.67
Posts /wp-admin/edit.php3.37 ▲0.0144.31 ▼1.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.75 ▼13.88
Media Library /wp-admin/upload.php3.24 ▲0.0135.44 ▲4.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sazx Hotlink Blocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.45 ▲0.161.62 ▼0.2442.48 ▼1.45
Dashboard /wp-admin2,206 ▲184.85 ▼0.05110.20 ▲5.1042.79 ▲1.55
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0234.88 ▼6.9131.89 ▼3.75
Add New Post /wp-admin/post-new.php1,535 ▲1423.17 ▼0.10646.42 ▼28.6362.13 ▲0.26
Media Library /wp-admin/upload.php1,382 ▼04.25 ▲0.0299.37 ▼3.0543.08 ▼1.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: HTTP_REFERER in wp-content/plugins/sazx-hot-link-blocker/file_sender.php on line 79

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: hotlink, media, images, files, attachments

sazx-hot-link-blocker/sazx_hotlink_blocker.php 85% from 13 tests

The principal PHP file in "Sazx Hotlink Blocker" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sazx-hot-link-blocker.php" instead of "sazx_hotlink_blocker.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.8" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26164103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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
Namespaces1
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%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants1
▷ Global constants1100.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