84% blackswan-block-external-request

Code Review | BlackSwan Block External Request

WordPress plugin BlackSwan Block External Request scored84%from 54 tests.

About plugin

  • Plugin page: blackswan-block-e...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Oct 30, 2022
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: blackswanlab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /322 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.43ms] Passed 4 tests

Analyzing server-side resources used by BlackSwan Block External Request
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.56 ▼4.47
Dashboard /wp-admin3.32 ▲0.0240.97 ▼5.14
Posts /wp-admin/edit.php3.37 ▲0.0245.85 ▼6.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.83 ▼21.82
Media Library /wp-admin/upload.php3.24 ▲0.0236.27 ▲1.43

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for BlackSwan Block External Request
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.001.69 ▼0.1239.85 ▼3.13
Dashboard /wp-admin2,206 ▲324.85 ▼0.01117.73 ▲1.6746.83 ▲2.14
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0240.28 ▲1.6636.17 ▲0.29
Add New Post /wp-admin/post-new.php1,542 ▲918.51 ▼4.69664.77 ▼45.3458.80 ▲2.55
Media Library /wp-admin/upload.php1,385 ▼04.20 ▼0.00100.72 ▼6.2042.74 ▼3.88

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

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

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
Good news, no errors were detected

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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/blackswan-block-external-request/blackswan-block-external-request.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: speed up wordpress, blackswan, wordpress request

blackswan-block-external-request/blackswan-block-external-request.php 85% from 13 tests

The main PHP script in "BlackSwan Block External Request" version 1.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.0" instead of "5.4")
  • Description: Please keep the plugin description shorter than 140 characters (currently 194 characters long)

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
Success! There were no dangerous files found in this plugin110 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP152360
PO File17742
Markdown1808

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin