84% timeline-express

Code Review | Timeline Express

WordPress plugin Timeline Express scored84%from 54 tests.

About plugin

  • Plugin page: timeline-express
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Mar 22, 2023
  • Number of updates: 201
  • Update frequency: every 15.3 days
  • Top authors: eherman24 (100%)

Code review

54 tests

User reviews

164 reviews

Install metrics

10,000+ active /504,952 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.00MB] [CPU: ▲0.41ms] 75% from 4 tests

An overview of server-side resources used by Timeline Express
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,394.67ms on /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-addons)
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.9442.36 ▲2.10
Dashboard /wp-admin4.36 ▲1.0260.70 ▼4.97
Posts /wp-admin/edit.php4.39 ▲1.0358.31 ▲9.99
Add New Post /wp-admin/post-new.php6.98 ▲1.10101.23 ▼1.08
Media Library /wp-admin/upload.php4.22 ▲0.9945.39 ▲5.59
New Announcement /wp-admin/post-new.php?post_type=te_announcements5.47131.47
Welcome /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-welcome4.2142.91
All Announcements /wp-admin/edit.php?post_type=te_announcements4.2847.14
Settings /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-settings5.1253.80
Add-Ons /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-addons4.461,394.67

Server storage [IO: ▲8.02MB] [DB: ▲0.13MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 559 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
post_type_rules_flushed_te-announcements
widget_recent-comments
theysaidso_admin_options
timeline_express_install_date
can_compress_scripts

Browser metrics Passed 4 tests

Timeline Express: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12114.28 ▼0.072.10 ▲0.2739.25 ▼10.33
Dashboard /wp-admin2,249 ▲685.59 ▼0.0988.53 ▼15.8465.70 ▲22.94
Posts /wp-admin/edit.php2,154 ▲572.04 ▲0.0238.47 ▲1.1832.81 ▼3.64
Add New Post /wp-admin/post-new.php6,253 ▲4,72519.06 ▼3.921,023.57 ▲237.4041.57 ▼14.99
Media Library /wp-admin/upload.php1,454 ▲544.28 ▲0.13103.98 ▼8.5355.58 ▲7.80
New Announcement /wp-admin/post-new.php?post_type=te_announcements18,07810.27726.17194.61
Welcome /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-welcome1,0942.4740.4455.62
All Announcements /wp-admin/edit.php?post_type=te_announcements1,2332.5838.3460.88
Settings /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-settings18,20111.05621.10153.84
Add-Ons /wp-admin/edit.php?post_type=te_announcements&page=timeline-express-addons1,5072.3730.0738.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • timeline_express_install_date
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/timeline-express/lib/classes/class-timeline-express-public.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/timeline-express/timeline-express.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/timeline-express/lib/admin/cpt/timeline-express-admin-columns.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/timeline-express/lib/admin/metaboxes/partials/advertisment-metabox.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/timeline-express/lib/admin/CMB2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/timeline-express/lib/admin/CMB2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/timeline-express/lib/admin/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/timeline-express/lib/admin/CMB2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/timeline-express/lib/admin/CMB2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/timeline-express/lib/admin/CMB2/includes/types/CMB2_Type_Picker_Base.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

timeline-express/timeline-express.php Passed 13 tests

The main PHP script in "Timeline Express" version 1.8.1 is automatically included on every request by WordPress
104 characters long description:
Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.

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
No dangerous file extensions were detected110,034 lines of code in 299 files:
LanguageFilesBlank linesComment linesLines of code
XML30047,748
PO File12113,91018,04431,904
PHP994,4797,76213,594
CSS301,5121,3649,131
JavaScript236706832,881
SVG1002,671
Sass14267251,265
Markdown42040613
JSON300134
Bourne Shell1231193

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.85
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes94
▷ Abstract classes1111.70%
▷ Concrete classes8388.30%
▷ Final classes00.00%
Methods877
▷ Static methods11112.66%
▷ Public methods75285.75%
▷ Protected methods11913.57%
▷ Private methods60.68%
Functions88
▷ Named functions8697.73%
▷ Anonymous functions22.27%
Constants19
▷ Global constants1368.42%
▷ Class constants631.58%
▷ Public constants6100.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
26 PNG files occupy 0.46MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/admin/images/timeline-express-settings.png115.09KB122.92KB0.00%
lib/admin/CMB2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/admin/images/timeline-express-logo-128.png7.60KB4.01KB▼ 47.27%
lib/admin/CMB2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
lib/admin/CMB2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%