10% wp-simile-timeline

Code Review | WP SIMILE Timeline

WordPress plugin WP SIMILE Timeline scored10%from 54 tests.

About plugin

  • Plugin page: wp-simile-timeline
  • Plugin version: 0.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Oct 8, 2008
  • Latest release: May 6, 2021
  • Number of updates: 432
  • Update frequency: every 10.6 days
  • Top authors: freshlabs (99.31%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /31,067 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-simile-timeline/inc/WPSimileTimeline.class.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; WPSimileTimeline has a deprecated constructor

Server metrics [RAM: ▼1.53MB] [CPU: ▼48.73ms] Passed 4 tests

An overview of server-side resources used by WP SIMILE Timeline
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.46 ▼1.005.52 ▼37.13
Dashboard /wp-admin2.48 ▼0.827.52 ▼38.53
Posts /wp-admin/edit.php2.49 ▼0.879.27 ▼39.67
Add New Post /wp-admin/post-new.php2.48 ▼3.418.66 ▼79.60
Media Library /wp-admin/upload.php2.49 ▼0.7510.27 ▼24.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 124 new files
Database: 4 new tables, 16 new options
New tables
wp_stl_timeline_bands
wp_stl_timeline_hotzones
wp_stl_timeline_terms
wp_stl_timeline_decorators
New WordPress options
stl_timeline_linkhandling
widget_theysaidso_widget
stl_timeline_startdate
can_compress_scripts
stl_timeline_plugin_version
db_upgraded
stl_timeline_usestartstop
stl_timeline_showbubbledate
theysaidso_admin_options
stl_timelinepageids
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP SIMILE Timeline
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11813.67 ▼1.079.67 ▲7.3840.00 ▼3.70
Dashboard /wp-admin2,204 ▲165.82 ▲0.76113.08 ▲4.4782.72 ▲40.08
Posts /wp-admin/edit.php2,099 ▲72.03 ▲0.0339.34 ▼0.1436.97 ▲1.55
Add New Post /wp-admin/post-new.php6,643 ▲5,12921.66 ▲4.25942.94 ▲255.4184.48 ▲27.94
Media Library /wp-admin/upload.php1,398 ▲104.18 ▼0.01106.01 ▲1.2245.04 ▲0.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-simile-timeline/inc/WPSimileTimeline.class.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; WPSimileTimeline has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • category_children
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-simile-timeline/data/timeline.xml.php
    • > /wp-content/plugins/wp-simile-timeline/data/timeline.css.php
    • > /wp-content/plugins/wp-simile-timeline/data/timeline.js.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECT * FROM wp_stl_timeline_terms WHERE term_id = made by WPSimileTimelineTerm->readTerm

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Timeline Widget Example), #2 (Configuration page), #3 (Content option page), #4 (Design and layout option page), #5 (Plugin Extras: Uninstaller and contextual help)
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can look at the official readme.txt

wp-simile-timeline/timeline.php 85% from 13 tests

The principal PHP file in "WP SIMILE Timeline" v. 0.5.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-simile-timeline.php" instead of "timeline.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 427 characters long)

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
Success! There were no dangerous files found in this plugin10,839 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript301683135,980
PHP156241,2803,112
PO File56401,0931,174
CSS5132104566
HTML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.90
▷ Minimum class complexity3.00
▷ Maximum class complexity63.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods91
▷ Static methods00.00%
▷ Public methods91100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
59 PNG files occupy 0.58MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/timeline_js/images/copyright.png1.37KB0.68KB▼ 49.93%
screenshot-3.png101.75KB38.38KB▼ 62.28%
src/timeline_js/images/message-right.png1.85KB0.38KB▼ 79.18%
src/timeline_ajax/images/message-right.png1.85KB0.38KB▼ 79.18%
src/timeline_ajax/images/message-bottom-left.png1.31KB1.08KB▼ 17.77%