74% forty-two-blocks

Code Review | Forty Two Blocks

WordPress plugin Forty Two Blocks scored74%from 54 tests.

About plugin

  • Plugin page: forty-two-blocks
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Sep 24, 2019
  • Number of updates: 3
  • Update frequency: every 120.3 days
  • Top authors: aspengrovestudios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.24MB] [CPU: ▼44.19ms] Passed 4 tests

This is a short check of server-side resources used by Forty Two Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7313.69 ▼33.84
Dashboard /wp-admin2.77 ▼0.5416.29 ▼33.21
Posts /wp-admin/edit.php2.77 ▼0.5916.11 ▼26.81
Add New Post /wp-admin/post-new.php2.77 ▼3.1215.62 ▼82.89
Media Library /wp-admin/upload.php2.77 ▼0.4615.88 ▼17.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Forty Two Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲22816.79 ▲2.3910.84 ▲9.0538.70 ▼4.57
Dashboard /wp-admin2,217 ▲266.92 ▲2.01116.96 ▲5.7339.31 ▲1.30
Posts /wp-admin/edit.php2,116 ▲273.84 ▲1.8347.67 ▲7.6933.78 ▲1.33
Add New Post /wp-admin/post-new.php6,369 ▲4,82525.49 ▲7.23890.21 ▲289.3554.36 ▲1.15
Media Library /wp-admin/upload.php1,411 ▲236.41 ▲2.15114.91 ▲16.6046.53 ▲2.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/forty-two-blocks/forty-two-blocks.php+64
    include_once(wp-content/plugins/forty-two-blocks/build/build.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 everything seems fine, this is not 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
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/includes/framework/PostsBlockType.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/blocks/Icon/Icon.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/forty-two-blocks/includes/strings.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks' not found in wp-content/plugins/forty-two-blocks/blocks/PostGrid/PostGrid.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forty-two-blocks/forty-two-blocks.php:147
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/blocks/SocialMediaLinks/SocialMediaLinks.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks' not found in wp-content/plugins/forty-two-blocks/blocks/PostCarousel/PostCarousel.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/blocks/SearchBar/SearchBar.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/blocks/CallToAction/CallToAction.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AspenGrove_Blocks\\BlockType' not found in wp-content/plugins/forty-two-blocks/blocks/ContactForm7/ContactForm7.php:15

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 Passed 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
2 plugin tags: blocks, gutenberg

forty-two-blocks/forty-two-blocks.php Passed 13 tests

"Forty Two Blocks" version 0.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
72 characters long description:
Enhance your Gutenberg content creation experience with our free blocks!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin9,807 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript377682626,757
PHP12137881,477
CSS1238114741
Markdown31540441
LESS818070305
JSON30067
SVG10019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.09
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods65
▷ Static methods57.69%
▷ Public methods6295.38%
▷ Protected methods23.08%
▷ Private methods11.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/flexslider/images/bg_play_pause.png1.51KB0.52KB▼ 65.52%