83% timeline-block-block

Code Review | Timeline Block

WordPress plugin Timeline Block scored83%from 54 tests.

About plugin

  • Plugin page: timeline-block-block
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 13, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 23
  • Update frequency: every 28.7 days
  • Top authors: charlescormier (60.87%)abuhayat (34.78%)srabonr (13.04%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /6,504 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.38ms] Passed 4 tests

Server-side resources used by Timeline Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.68 ▲0.90
Dashboard /wp-admin3.39 ▲0.0857.60 ▲4.94
Posts /wp-admin/edit.php3.51 ▲0.1454.00 ▼0.43
Add New Post /wp-admin/post-new.php6.00 ▲0.1189.07 ▼13.02
Media Library /wp-admin/upload.php3.31 ▲0.0838.49 ▼0.97

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Timeline Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.42 ▲0.061.91 ▲0.2644.62 ▲2.45
Dashboard /wp-admin2,192 ▲155.55 ▼0.0383.52 ▼4.4743.00 ▲2.67
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0334.48 ▼1.2436.97 ▲2.84
Add New Post /wp-admin/post-new.php6,368 ▲4,84028.03 ▲4.95900.50 ▲264.2938.57 ▼19.31
Media Library /wp-admin/upload.php1,400 ▲34.13 ▼0.03106.23 ▲10.5245.49 ▲3.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TLGB\\Inc\\plugin_dir_path() in wp-content/plugins/timeline-block-block/inc/style.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/timeline-block-block/inc/block.php:2
    • > PHP Warning
      Use of undefined constant TLGB_VERSION - assumed 'TLGB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-block-block/dist/editor.asset.php on line 3

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (All Block Directory) image required
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

timeline-block-block/plugin.php 85% from 13 tests

The entry point to "Timeline Block" version 1.0.6 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
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("timeline-block-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected857 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS302351
PHP64716264
JSON200129
PO File14584108
JavaScript3083
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods13
▷ Static methods753.85%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/timeline.png0.90KB1.07KB0.00%