83% text-carousel-block

Code Review | Text Carousel Block

WordPress plugin Text Carousel Block scored83%from 54 tests.

About plugin

  • Plugin page: text-carousel-block
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 24, 2020
  • Latest release: Sep 5, 2023
  • Number of updates: 7
  • Update frequency: every 145.0 days
  • Top authors: tishonator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,060 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
Installer ran successfully

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

A check of server-side resources used by Text Carousel Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.61 ▲0.09
Dashboard /wp-admin3.32 ▲0.0246.88 ▼1.72
Posts /wp-admin/edit.php3.37 ▲0.0246.00 ▼3.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.16 ▼9.88
Media Library /wp-admin/upload.php3.24 ▲0.0232.31 ▼4.97

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Text Carousel Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.61 ▼0.798.87 ▲7.0944.61 ▲2.31
Dashboard /wp-admin2,206 ▲215.91 ▲0.99104.34 ▼1.4441.99 ▲0.07
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.0840.78 ▼0.2333.73 ▼4.67
Add New Post /wp-admin/post-new.php6,359 ▲4,84029.85 ▲6.85831.48 ▲241.0164.54 ▲16.91
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.01101.16 ▲0.9041.95 ▼2.45

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-carousel-block/text-carousel-block.php:117

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add a description for screenshot #3 in text-carousel-block/assets to your readme.txt
  • Screenshots: Screenshot #4 (Text Carousel Block) image missing
You can take inspiration from this readme.txt

text-carousel-block/text-carousel-block.php 92% from 13 tests

The main PHP script in "Text Carousel Block" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)

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
No dangerous file extensions were detected4,977 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS39202,200
JavaScript25079572,073
SVG100655
PHP1264349

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected