89% before-after-image-block

Code Review | Before After image Gutenberg Block

WordPress plugin Before After image Gutenberg Block scored89%from 54 tests.

About plugin

  • Plugin page: before-after-imag...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Mar 10, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kardi420 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /378 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.79ms] Passed 4 tests

Analyzing server-side resources used by Before After image Gutenberg Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.53 ▼7.11
Dashboard /wp-admin3.32 ▲0.0249.87 ▼0.32
Posts /wp-admin/edit.php3.37 ▲0.0149.49 ▲2.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.98 ▼15.09
Media Library /wp-admin/upload.php3.24 ▲0.0138.72 ▼0.63

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Before After image Gutenberg Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.34 ▼0.191.77 ▼0.0445.29 ▲2.67
Dashboard /wp-admin2,195 ▲175.62 ▼0.0295.07 ▼25.0538.22 ▼4.52
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0234.07 ▼4.8933.84 ▼1.77
Add New Post /wp-admin/post-new.php6,199 ▲4,66419.21 ▲0.86944.39 ▲255.1555.91 ▼11.22
Media Library /wp-admin/upload.php1,397 ▲34.16 ▼0.05103.32 ▼1.3845.74 ▼1.87

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

before-after-image-block/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Before After image Gutenberg Block" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("before-after-image-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,015 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,649
JavaScript42820208
Sass36784
PHP2206072
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin