84% casia-blocks

Code Review | Casia Blocks

WordPress plugin Casia Blocks scored84%from 54 tests.

About plugin

  • Plugin page: casia-blocks
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2019
  • Latest release: Jul 5, 2019
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: castellar120 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.17MB] [CPU: ▼11.29ms] Passed 4 tests

Analyzing server-side resources used by Casia Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.51 ▼8.50
Dashboard /wp-admin3.33 ▲0.0255.91 ▲4.63
Posts /wp-admin/edit.php3.38 ▲0.0254.02 ▲1.34
Add New Post /wp-admin/post-new.php5.16 ▼0.7368.92 ▼30.55
Media Library /wp-admin/upload.php3.25 ▲0.0239.60 ▼7.46

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Casia Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.19 ▼0.161.79 ▲0.0643.08 ▲0.86
Dashboard /wp-admin2,197 ▲175.54 ▼0.1182.78 ▼16.0528.76 ▼14.86
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0238.48 ▼1.1226.13 ▼14.07
Add New Post /wp-admin/post-new.php6,212 ▲4,68419.14 ▼4.01972.90 ▲304.8033.81 ▼37.61
Media Library /wp-admin/upload.php1,402 ▲24.20 ▲0.00106.76 ▲0.1235.62 ▼11.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/casia-blocks/casia-blocks.php:12

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

Often overlooked, readme.txt is one of the most important files in your plugin
No plugin tags provided

casia-blocks/casia-blocks.php 92% from 13 tests

"Casia Blocks" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin1,160 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript76058682
CSS29111395
PHP1202483

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
934x139-min.png2.23KB2.21KB▼ 0.83%
500.png1.49KB1.43KB▼ 3.87%