73% timeline-designer

Code Review | Timeline Designer

WordPress plugin Timeline Designer scored73%from 54 tests.

About plugin

  • Plugin page: timeline-designer
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 12
  • Update frequency: every 83.7 days
  • Top authors: solwininfotech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,659 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.07MB] [CPU: ▲12.55ms] 75% from 4 tests

A check of server-side resources used by Timeline Designer
Please fix the following
  • RAM: The total memory usage must be kept under 10MB (currently 10.76MB on /wp-admin/admin.php?page=add_wtl_shortcode)
PageMemory (MB)CPU Time (ms)
Home /5.51 ▲2.0553.63 ▲13.63
Dashboard /wp-admin5.38 ▲2.0763.48 ▲14.82
Posts /wp-admin/edit.php5.49 ▲2.1363.10 ▲11.93
Add New Post /wp-admin/post-new.php7.98 ▲2.09102.95 ▲9.83
Media Library /wp-admin/upload.php5.30 ▲2.0652.76 ▲16.18
Add Timeline Layout /wp-admin/admin.php?page=add_wtl_shortcode10.76132.93
Import Layouts /wp-admin/admin.php?page=wtl_export5.3153.91
Add Custom Post Type /wp-admin/admin.php?page=add_wtl_cpt5.4257.14
Timeline Layouts /wp-admin/admin.php?page=wtl_layouts5.4354.26
Custom Post Type /wp-admin/admin.php?page=wtl_cpts5.3747.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 217 new files
Database: 2 new tables, 6 new options
New tables
wp_wtl_shortcodes
wp_wtl_cpts
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics 75% from 4 tests

Timeline Designer: an overview of browser usage
Please improve the following
  • Nodes: You must limit the number of DOM nodes under 25,000 (currently 38,773 on /wp-admin/admin.php?page=add_wtl_shortcode)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20413.96 ▼0.3813.14 ▲11.3838.20 ▼6.29
Dashboard /wp-admin2,256 ▲765.03 ▼0.55105.25 ▲8.7993.40 ▲50.18
Posts /wp-admin/edit.php2,154 ▲542.45 ▲0.4843.80 ▼3.4033.60 ▼1.53
Add New Post /wp-admin/post-new.php2,216 ▲69023.58 ▲0.42723.91 ▲125.91121.16 ▲70.83
Media Library /wp-admin/upload.php1,474 ▲714.51 ▲0.2291.72 ▼6.0362.14 ▲21.46
Add Timeline Layout /wp-admin/admin.php?page=add_wtl_shortcode38,77310.831,004.89208.91
Import Layouts /wp-admin/admin.php?page=wtl_export1,1495.2781.1432.11
Add Custom Post Type /wp-admin/admin.php?page=add_wtl_cpt1,5735.2193.0444.29
Timeline Layouts /wp-admin/admin.php?page=wtl_layouts1,3095.5267.3925.31
Custom Post Type /wp-admin/admin.php?page=wtl_cpts1,0522.1431.8623.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_wtl_cpts
    • wp_wtl_shortcodes
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/timeline-designer/public/css/layout-dynamic-style.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/timeline-designer/admin/class-wp-timeline-lite-support.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeline-designer/wp_timeline_templates/template-reset/class-wtl-lite-template-reset.php:26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-designer/admin/class-wp-timeline-lite-support.php on line 52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeline-designer/admin/class-wtl-lite-custom-post-type.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeline-designer/admin/class-wp-timeline-lite-ajax.php:53
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/timeline-designer/admin/class-wp-timeline-lite-support.php on line 52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/timeline-designer/wp_timeline_templates/template-class/class-wtl-lite-template-advanced-layout.php:26
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/timeline-designer/admin/class-wp-timeline-lite-support.php on line 52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/timeline-designer/wp_timeline_templates/class-wtl-lite-template-config.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in timeline-designer/assets to your readme.txt
You can look at the official readme.txt

timeline-designer/timeline-designer.php 92% from 13 tests

The main file in "Timeline Designer" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin39,717 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP444652,41922,519
CSS2165540411,217
JavaScript141421333,082
SVG40122,899

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 392)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity144.72
▷ Minimum class complexity1.00
▷ Maximum class complexity561.00
Average method complexity13.26
▷ Minimum method complexity1.00
▷ Maximum method complexity392.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods211
▷ Static methods13162.09%
▷ Public methods20496.68%
▷ Protected methods00.00%
▷ Private methods73.32%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
63 compressed PNG files occupy 0.82MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pagination/template-2.png2.52KB2.12KB▼ 15.76%
public/images/logbook/dark/dot-selected.png0.48KB0.59KB0.00%
images/navigation/navigation2.png0.25KB0.26KB0.00%
admin/images/ui-icons_454545_256x240.png3.49KB3.82KB0.00%
admin/images/ui-icons_2e83ff_256x240.png3.50KB3.83KB0.00%