84% timeline-blocks

Code Review | Timeline Blocks for Gutenberg

WordPress plugin Timeline Blocks for Gutenberg scored84%from 54 tests.

About plugin

  • Plugin page: timeline-blocks
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 13
  • Update frequency: every 139.4 days
  • Top authors: techeshta (69.23%)alkesh7 (38.46%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /14,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.45ms] Passed 4 tests

Analyzing server-side resources used by Timeline Blocks for Gutenberg
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2044.14 ▲5.97
Dashboard /wp-admin3.49 ▲0.1948.49 ▼2.32
Posts /wp-admin/edit.php3.61 ▲0.2543.85 ▼4.00
Add New Post /wp-admin/post-new.php6.09 ▲0.2080.31 ▼6.73
Media Library /wp-admin/upload.php3.42 ▲0.1833.25 ▼0.73

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
tb_timeline_gutenberg_do_activation_redirect
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Timeline Blocks for Gutenberg
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▲0.371.73 ▲0.0847.21 ▼1.44
Dashboard /wp-admin2,192 ▲155.61 ▼0.05100.72 ▲6.7841.83 ▼0.59
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0435.42 ▼2.5231.42 ▼4.12
Add New Post /wp-admin/post-new.php6,202 ▲4,67619.51 ▼3.84937.43 ▲246.6738.57 ▼23.56
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.1094.29 ▼6.6141.28 ▼4.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • tb_timeline_gutenberg_do_activation_redirect
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant TB_DIR - assumed 'TB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-helper.php on line 70
    • > PHP Warning
      require(TB_DIRsrc/tb-helper/class-tb-helper.php): failed to open stream: No such file or directory in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-loader.php on line 50
    • > PHP Warning
      Use of undefined constant TB_DIR - assumed 'TB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-loader.php on line 50
    • > PHP Warning
      require(TB_DIRsrc/tb-helper/class-tb-config.php): failed to open stream: No such file or directory in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-helper.php on line 70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeline-blocks/src/blocks/index.php:654
    • > PHP Fatal error
      require(): Failed opening required 'TB_DIRsrc/tb-helper/class-tb-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-loader.php on line 50
    • > PHP Fatal error
      require(): Failed opening required 'TB_DIRsrc/tb-helper/class-tb-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/timeline-blocks/src/tb-helper/class-tb-helper.php on line 70

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: gutenberg block, timeline layouts, timeline blocks, timeline templates, post timeline blocks

timeline-blocks/timeline-blocks.php Passed 13 tests

The primary PHP file in "Timeline Blocks for Gutenberg" version 1.1.6 is used by WordPress to initiate all plugin functionality
112 characters long description:
A beautiful timeline block to showcase your posts in timeline presentation with multiple templates availability.

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
There were no executable files found in this plugin11,451 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS141,850504,360
SVG3003,927
JavaScript12142611,248
PHP102514551,128
Sass410614788

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes342.86%
Methods25
▷ Static methods1248.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin