94% block-scripts-a

Code Review | Block scripts A

WordPress plugin Block scripts A scored 94% from 54 tests.

About plugin

  • Plugin page: block-scripts-a
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Sep 22, 2018
  • Latest release: Sep 22, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: oleksandr87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 368 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼136.29ms] Passed 4 tests

A check of server-side resources used by Block scripts A
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.36 ▲19.48
Dashboard /wp-admin3.06 ▲0.0145.61 ▲11.29
Posts /wp-admin/edit.php3.12 ▲0.0142.63 ▲2.06
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.28 ▼559.18
Media Library /wp-admin/upload.php3.00 ▲0.0030.84 ▲0.67

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • There were 1 file (3.07KB) illegally modified outside of "wp-content/plugins/block-scripts-a/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Block scripts A
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.37 ▲0.708.98 ▼1.1748.58 ▼5.31
Dashboard /wp-admin2,973 ▲396.13 ▲0.14136.91 ▼1.18105.91 ▼7.81
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0262.12 ▼0.5389.53 ▼2.45
Add New Post /wp-admin/post-new.php1,672 ▲17418.82 ▲0.03378.33 ▼0.52116.53 ▲7.47
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.01143.43 ▼7.54129.60 ▲13.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-scripts-a/index.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: injections, block, rfi, protection, xss...

block-scripts-a/index.php 92% from 13 tests

The main PHP script in "Block scripts A" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("block-scripts-a.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182258

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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