84% eazy-image-slider-block

Code Review | Eazy Image Slider Block

WordPress plugin Eazy Image Slider Block scored84%from 54 tests.

About plugin

  • Plugin page: eazy-image-slider...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Dec 28, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: playwithpixels (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 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.11MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by Eazy Image Slider Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.55 ▼3.38
Dashboard /wp-admin3.42 ▲0.1149.12 ▲0.29
Posts /wp-admin/edit.php3.53 ▲0.1742.78 ▼2.92
Add New Post /wp-admin/post-new.php6.00 ▲0.1184.93 ▼3.40
Media Library /wp-admin/upload.php3.34 ▲0.1038.52 ▲5.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Eazy Image Slider Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4613.60 ▼0.701.73 ▼0.3841.31 ▼5.71
Dashboard /wp-admin2,206 ▲155.84 ▲0.9596.74 ▼22.8640.90 ▼11.34
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0136.52 ▼2.3134.12 ▼1.88
Add New Post /wp-admin/post-new.php6,588 ▲5,05529.26 ▲5.89889.75 ▲208.1257.07 ▼3.88
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0596.48 ▼7.4741.48 ▼5.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_unique_id() in wp-content/plugins/eazy-image-slider-block/includes/Blocks/ImageSlider/view.php:20
    • > PHP Warning
      array_intersect_key(): Expected parameter 1 to be an array, null given in wp-content/plugins/eazy-image-slider-block/includes/Blocks/ImageSlider/view.php on line 17
    • > PHP Fatal error
      Trait 'tkiss\\EazyImageSliderBlock\\Traits\\Singleton' not found in wp-content/plugins/eazy-image-slider-block/includes/Blocks/Blocks.php on line 19
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/eazy-image-slider-block/includes/Blocks/ImageSlider/view.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/eazy-image-slider-block/vendor/cjstroud/classnames-php/tests/ClassNamesTest.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: image, tk, easy, simple, gallery...

eazy-image-slider-block/eazy-image-slider-block.php 92% from 13 tests

The entry point to "Eazy Image Slider Block" version 1.0.0 is a PHP file that has certain tags in its header comment area
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 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,270 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP21228538901
JSON300169
Markdown2480105
PO File1242569
XML10021
JavaScript20124
CSS2101

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits1
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods2034.48%
▷ Public methods5289.66%
▷ Protected methods46.90%
▷ Private methods23.45%
Functions15
▷ Named functions1066.67%
▷ Anonymous functions533.33%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.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