84% timeline-blocks

Code Review | Timeline Blocks for Gutenberg

WordPress plugin Timeline Blocks for Gutenberg scored 84% from 54 tests.

About plugin

  • Plugin page: timeline-blocks
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7
  • WordPress version: 5.9.2
  • First release: Oct 19, 2018
  • Latest release: Mar 13, 2021
  • Number of updates: 10
  • Update frequency: every 87.6 days
  • Top authors: techeshta (60%)alkesh7 (50%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active / 10,122 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.15MB] [CPU: ▼308.04ms] Passed 4 tests

Analyzing server-side resources used by Timeline Blocks for Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2654.90 ▲4.59
Dashboard /wp-admin3.60 ▲0.1935.61 ▲1.31
Posts /wp-admin/edit.php3.82 ▲0.1838.40 ▲0.78
Add New Post /wp-admin/post-new.php5.82 ▼1.1554.30 ▼1,238.84
Media Library /wp-admin/upload.php3.47 ▲0.1828.39 ▲5.22

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, 1 new option
New WordPress options
tb_timeline_gutenberg_do_activation_redirect

Browser metrics Passed 4 tests

Checking browser requirements for Timeline Blocks for Gutenberg
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲4716.19 ▲0.526.21 ▼0.242.27 ▲0.09
Dashboard /wp-admin2,895 ▲446.17 ▲0.10118.20 ▼15.89154.23 ▼6.11
Posts /wp-admin/edit.php2,691 ▲33.23 ▼0.0262.99 ▲0.33138.32 ▼4.32
Add New Post /wp-admin/post-new.php1,766 ▲10622.30 ▲6.62481.64 ▲83.86175.64 ▲21.25
Media Library /wp-admin/upload.php1,698 ▼05.46 ▼0.07140.23 ▲3.06180.80 ▲1.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • tb_timeline_gutenberg_do_activation_redirect

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
  • 7× PHP files trigger server errors when accessed directly:
    • > 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
    • > 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-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 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 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 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: post timeline blocks, timeline templates, timeline layouts, timeline blocks, gutenberg block

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

Analyzing the main PHP file in "Timeline Blocks for Gutenberg" version 1.1.3
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 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous 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

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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

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