77% cool-timeline

Code Review | Cool Timeline (Horizontal & Vertical Timeline)

WordPress plugin Cool Timeline (Horizontal & Vertical Timeline) scored77%from 54 tests.

About plugin

  • Plugin page: cool-timeline
  • Plugin version: 2.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2015
  • Latest release: Oct 17, 2023
  • Number of updates: 282
  • Update frequency: every 10.2 days
  • Top authors: Narinder singh (100%)

Code review

54 tests

User reviews

296 reviews

Install metrics

20,000+ active /546,758 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.62MB] [CPU: ▲6.62ms] 75% from 4 tests

An overview of server-side resources used by Cool Timeline (Horizontal & Vertical Timeline)
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 738.45ms on /wp-admin/admin.php?page=cool-plugins-timeline-addon)
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4440.34 ▲2.41
Dashboard /wp-admin5.33 ▲1.9862.95 ▲4.98
Posts /wp-admin/edit.php5.39 ▲2.0356.77 ▲8.44
Add New Post /wp-admin/post-new.php10.40 ▲4.51106.19 ▲10.66
Media Library /wp-admin/upload.php5.26 ▲2.0253.29 ▲19.57
Timeline Settings /wp-admin/admin.php?page=cool_timeline_settings8.1267.53
Cool Timeline Stories /wp-admin/edit.php?post_type=cool_timeline8.1957.33
Dashboard /wp-admin/admin.php?page=cool-plugins-timeline-addon5.28738.45
Add New Story /wp-admin/post-new.php?post_type=cool_timeline8.1869.26

Server storage [IO: ▲12.01MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 296 new files
Database: no new tables, 14 new options
New WordPress options
cool-timelne-plugin-type
theysaidso_admin_options
cool-plugins-timeline-addon-timeline
cool-plugins-timeline-addon-timeline-pro
cool_timeline_settings
cool-timeline-already-rated
widget_theysaidso_widget
ctl-upgraded
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for Cool Timeline (Horizontal & Vertical Timeline)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11314.33 ▼0.331.94 ▲0.2945.95 ▲9.33
Dashboard /wp-admin2,237 ▲575.56 ▼0.0692.31 ▲7.6971.32 ▲28.04
Posts /wp-admin/edit.php2,154 ▲511.99 ▼0.0333.97 ▼0.4632.91 ▲2.30
Add New Post /wp-admin/post-new.php1,861 ▲33327.44 ▲4.45956.60 ▲269.5433.46 ▼15.62
Media Library /wp-admin/upload.php1,460 ▲604.18 ▼0.01101.56 ▲4.0069.84 ▲23.54
Timeline Settings /wp-admin/admin.php?page=cool_timeline_settings2,0604.5375.1080.92
Cool Timeline Stories /wp-admin/edit.php?post_type=cool_timeline1,3924.1352.5856.63
Dashboard /wp-admin/admin.php?page=cool-plugins-timeline-addon1,0832.0326.9633.14
Add New Story /wp-admin/post-new.php?post_type=cool_timeline2,8498.66181.73143.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 14 options in the database
    • cool-plugins-timeline-addon-timeline-pro
    • widget_theysaidso_widget
    • db_upgraded
    • cool-timelne-installDate
    • cool-plugins-timeline-addon-timeline
    • ctl-upgraded
    • cool-timeline-already-rated
    • can_compress_scripts
    • cool-free-timeline-v
    • theysaidso_admin_options
    • ...

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cool-timeline/admin/timeline-addon-page/includes/cool_plugins_downloader.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cool-timeline/includes/shortcode-blocks/ctl-block.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: roadmap, vertical timeline, gutenberg timeline, history, horizontal timeline...

cool-timeline/cooltimeline.php 85% from 13 tests

"Cool Timeline (Horizontal & Vertical Timeline)" version 2.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 266 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cool-timeline.php" instead of "cooltimeline.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected107,161 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4010,3649,68564,997
PHP1073,9491,96418,231
CSS221,18858010,430
PO File243,3183,7236,872
Sass211,030196,214
Markdown2850379
JSON10035
SVG3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity25.75
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity6.53
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes76
▷ Abstract classes22.63%
▷ Concrete classes7497.37%
▷ Final classes22.70%
Methods340
▷ Static methods6318.53%
▷ Public methods33698.82%
▷ Protected methods00.00%
▷ Private methods41.18%
Functions32
▷ Named functions3196.88%
▷ Anonymous functions13.12%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 0.58MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/timeline-addon-page/assets/images/timeline-widget-addon-for-elementor-pro.png6.02KB6.24KB0.00%
assets/images/prettyPhoto/default/sprite.png6.53KB3.21KB▼ 50.87%
includes/shortcode-blocks/dist/images/timeline.27d3f3c7.png123.22KB29.32KB▼ 76.20%
assets/images/cooltimeline.png1.30KB0.35KB▼ 73.18%
admin/timeline-addon-page/assets/images/timeline-builder-pro.png6.10KB6.46KB0.00%