73% advanced-blocks-pro

Code Review | Advanced Blocks Pro

WordPress plugin Advanced Blocks Pro scored73%from 54 tests.

About plugin

  • Plugin page: advanced-blocks-pro
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2023
  • Latest release: Feb 25, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: essamamdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.78MB] [CPU: ▲65.97ms] Passed 4 tests

A check of server-side resources used by Advanced Blocks Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.30 ▲2.83121.02 ▲82.10
Dashboard /wp-admin6.06 ▲2.71128.57 ▲64.20
Posts /wp-admin/edit.php6.17 ▲2.81107.41 ▲56.90
Add New Post /wp-admin/post-new.php9.96 ▲4.08163.23 ▲60.66
Media Library /wp-admin/upload.php5.98 ▲2.75115.97 ▲83.09

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,076 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Blocks Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15913.51 ▼0.919.10 ▲7.4943.53 ▲3.53
Dashboard /wp-admin2,210 ▲194.85 ▼1.03108.32 ▲11.6139.21 ▼2.00
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0533.88 ▼2.4431.71 ▼0.62
Add New Post /wp-admin/post-new.php1,806 ▲29230.84 ▲13.16701.14 ▲30.2234.43 ▼17.85
Media Library /wp-admin/upload.php1,392 ▲44.29 ▲0.10101.61 ▼4.1945.79 ▼1.16

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 326× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant rsZWJ - assumed 'rsZWJ' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-blocks-pro/vendor/lodash-php/lodash-php/src/internal/hasUnicode.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleHtmlDomNode' not found in wp-content/plugins/advanced-blocks-pro/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDomNode.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\PropertyAccess\\Exception\\ExceptionInterface' not found in wp-content/plugins/advanced-blocks-pro/vendor/symfony/property-access/Exception/OutOfBoundsException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/advanced-blocks-pro/vendor/sabberworm/php-css-parser/src/Value/RuleValueList.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/advanced-blocks-pro/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/advanced-blocks-pro/vendor/sabberworm/php-css-parser/src/Property/Charset.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\CSSFunction' not found in wp-content/plugins/advanced-blocks-pro/vendor/sabberworm/php-css-parser/src/Value/CalcFunction.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/advanced-blocks-pro/vendor/scssphp/scssphp/src/Formatter/Debug.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' not found in wp-content/plugins/advanced-blocks-pro/vendor/symfony/property-access/Exception/NoSuchPropertyException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/advanced-blocks-pro/vendor/sabberworm/php-css-parser/src/Value/Size.php:10

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: You can look at the official readme.txt

advanced-blocks-pro/advanced-blocks-pro.php 85% from 13 tests

The entry point to "Advanced Blocks Pro" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/languages languages folder path")
  • Description: The description should be shorter than 140 characters (currently 369 characters long)

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/advanced-blocks-pro/vendor/bin/pscss.bat
101,389 lines of code in 998 files:
LanguageFilesBlank linesComment linesLines of code
PHP68810,57722,01751,307
JavaScript11252322210,788
JSON804010,025
SVG150129,931
CSS383,670608,138
Sass221,583415,818
Markdown363,18515,204
YAML4241133
XML23040
DOS Batch1005

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,493)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity14.80
▷ Minimum class complexity1.00
▷ Maximum class complexity1,493.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces59
Interfaces40
Traits1
Classes394
▷ Abstract classes205.08%
▷ Concrete classes37494.92%
▷ Final classes3910.43%
Methods2,464
▷ Static methods1877.59%
▷ Public methods1,92578.12%
▷ Protected methods36014.61%
▷ Private methods1797.26%
Functions527
▷ Named functions34365.09%
▷ Anonymous functions18434.91%
Constants330
▷ Global constants4112.42%
▷ Class constants28987.58%
▷ Public constants26190.31%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin