83% timeline-slider

Code Review | Timeline Slider

WordPress plugin Timeline Slider scored83%from 54 tests.

About plugin

  • Plugin page: timeline-slider
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Jan 25, 2022
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: thevisionofhamza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.99ms] Passed 4 tests

Analyzing server-side resources used by Timeline Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.40 ▲1.71
Dashboard /wp-admin3.35 ▲0.0047.98 ▼24.08
Posts /wp-admin/edit.php3.40 ▲0.0451.87 ▼2.22
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.40 ▼19.35
Media Library /wp-admin/upload.php3.27 ▲0.0439.09 ▲2.91
Add New Timeline Slide /wp-admin/post-new.php?post_type=timeline_slider6.0187.15
Timeline Slides /wp-admin/edit.php?post_type=timeline_slider3.3137.09
Timeline Layouts /wp-admin/edit-tags.php?taxonomy=timeline_layout&post_type=timeline_slider3.2635.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Timeline Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20013.95 ▼0.709.04 ▲7.3340.66 ▼5.44
Dashboard /wp-admin2,252 ▲524.87 ▼1.00104.47 ▼2.6539.48 ▼1.63
Posts /wp-admin/edit.php2,131 ▲312.02 ▲0.0135.97 ▼3.6834.39 ▼1.64
Add New Post /wp-admin/post-new.php1,580 ▲4918.31 ▼4.83635.02 ▼45.2051.79 ▼1.40
Media Library /wp-admin/upload.php1,434 ▲374.23 ▼0.1899.02 ▼3.3146.51 ▲5.22
Add New Timeline Slide /wp-admin/post-new.php?post_type=timeline_slider6,22322.45816.4428.82
Timeline Slides /wp-admin/edit.php?post_type=timeline_slider1,1011.9932.3631.50
Timeline Layouts /wp-admin/edit-tags.php?taxonomy=timeline_layout&post_type=timeline_slider1,3132.1429.3830.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
  • 6× 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/timeline-slider/includes/timelinewp-tax.php:2
    • > PHP Warning
      Use of undefined constant TWP_PATH - assumed 'TWP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-slider/includes/timelinewp-class.php on line 6
    • > PHP Fatal error
      require(): Failed opening required 'TWP_PATHincludes/timelinewp-cpt.php' (include_path='.:/usr/share/php') in wp-content/plugins/timeline-slider/includes/timelinewp-class.php on line 6
    • > PHP Warning
      require(TWP_PATHincludes/timelinewp-cpt.php): failed to open stream: No such file or directory in wp-content/plugins/timeline-slider/includes/timelinewp-class.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/timeline-slider/public/timelinewp-front-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timeline-slider/includes/timelinewp-cpt.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: Contributors not specified
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5 in timeline-slider/assets to your readme.txt
The official readme.txt might help

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

The primary PHP file in "Timeline Slider" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 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
There were no executable files found in this plugin2,666 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2854472,152
CSS2495267
PHP62824247

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin