84% anything-block

Code Review | Anything Block

WordPress plugin Anything Block scored84%from 54 tests.

About plugin

  • Plugin page: anything-block
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Oct 17, 2023
  • Number of updates: 5
  • Update frequency: every 256.2 days
  • Top authors: aristath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Anything Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0131.92 ▼4.05
Dashboard /wp-admin3.31 ▼0.0442.73 ▼17.30
Posts /wp-admin/edit.php3.36 ▲0.0052.86 ▲5.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.03 ▼12.34
Media Library /wp-admin/upload.php3.23 ▲0.0033.72 ▲1.25

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anything Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.35 ▲0.001.69 ▼0.2040.19 ▼0.18
Dashboard /wp-admin2,195 ▲185.65 ▲0.0484.54 ▼4.8642.02 ▲3.59
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0234.93 ▼0.5833.34 ▼1.18
Add New Post /wp-admin/post-new.php6,362 ▲4,83627.68 ▲4.03893.43 ▲207.6758.94 ▲6.69
Media Library /wp-admin/upload.php1,400 ▼04.30 ▲0.1294.70 ▼10.0044.10 ▼2.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anything-block/anything.php:104

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: gutenberg blocks, editor, gutenberg, blocks

anything-block/anything.php 92% from 13 tests

The entry point to "Anything Block" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("anything-block.php" instead of "anything.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
There were no executable files found in this plugin112 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11845111
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions4
▷ Named functions4100.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