84% knight-lab-timelinejs

Code Review | Knight Lab Timeline

WordPress plugin Knight Lab Timeline scored84%from 54 tests.

About plugin

  • Plugin page: knight-lab-timeli...
  • Plugin version: 3.9.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Jul 7, 2023
  • Number of updates: 113
  • Update frequency: every 31.1 days
  • Top authors: NUKnightLab (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /73,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.47ms] Passed 4 tests

A check of server-side resources used by Knight Lab Timeline
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.29 ▼2.82
Dashboard /wp-admin3.32 ▼0.0348.42 ▼16.50
Posts /wp-admin/edit.php3.36 ▲0.0154.44 ▲2.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.42 ▼8.79
Media Library /wp-admin/upload.php3.24 ▲0.0139.41 ▲3.19

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Knight Lab Timeline
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,398 ▲63713.42 ▼0.937.89 ▲6.2643.12 ▲2.60
Dashboard /wp-admin2,725 ▲5485.64 ▼0.0393.00 ▼0.1242.90 ▲5.65
Posts /wp-admin/edit.php2,633 ▲5331.98 ▼0.0544.43 ▲3.5435.54 ▼3.72
Add New Post /wp-admin/post-new.php2,056 ▲53023.15 ▼0.48654.22 ▼16.2356.42 ▼14.97
Media Library /wp-admin/upload.php1,933 ▲5334.21 ▲0.0496.50 ▼37.7840.50 ▼19.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/knight-lab-timelinejs/knightlab-timeline.php:19

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: knightlab, timelineveriteco, stamen, timeline, verite...

knight-lab-timelinejs/knightlab-timeline.php 92% from 13 tests

This is the main PHP file of "Knight Lab Timeline" version 3.9.3.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("knight-lab-timelinejs.php" instead of "knightlab-timeline.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin25,302 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
CSS44461,59710,469
JavaScript731,9082,2138,134
JSON69105,325
HTML11121,104
PHP12189164
SVG10066
XML17429
Markdown27011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
10 PNG files occupy 0.46MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/timeline-texture.png40.07KB44.06KB0.00%
knight-diamond.png3.36KB0.16KB▼ 95.17%
button-tinymce.png0.32KB0.34KB0.00%
css/fancybox_sprite.png1.33KB1.42KB0.00%
css/fancybox_sprite@2x.png5.86KB5.76KB▼ 1.60%