72% post-timeline

Code Review | Post Timeline

WordPress plugin Post Timeline scored72%from 54 tests.

About plugin

  • Plugin page: post-timeline
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 7, 2016
  • Latest release: Oct 3, 2023
  • Number of updates: 138
  • Update frequency: every 18.0 days
  • Top authors: agilelogix (92.75%)zubairharoon (7.97%)

Code review

54 tests

User reviews

14 reviews

Install metrics

800+ active /27,272 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.26MB] [CPU: ▼2.53ms] Passed 4 tests

Server-side resources used by Post Timeline
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.92 ▲1.4656.34 ▲14.85
Dashboard /wp-admin4.56 ▲1.2251.94 ▼13.35
Posts /wp-admin/edit.php4.69 ▲1.3351.42 ▼3.08
Add New Post /wp-admin/post-new.php6.99 ▲1.10112.28 ▼2.37
Media Library /wp-admin/upload.php4.63 ▲1.4044.46 ▲8.68
Tags /wp-admin/edit-tags.php?taxonomy=ptl_tag&post_type=post-timeline4.6238.60
Dashboard /wp-admin/edit.php?post_type=post-timeline&page=ptl-dashboard4.5535.10
All Timeline Post /wp-admin/edit.php?post_type=post-timeline4.6843.20
Create Custom Post Type /wp-admin/options-writing.php?page=ptl-cpt-form3.6527.32
Add New /wp-admin/post-new.php?post_type=post-timeline4.7278.98
Timeline Settings /wp-admin/edit.php?post_type=post-timeline&page=timeline-settings4.5547.29
Categories /wp-admin/edit-tags.php?taxonomy=ptl_categories&post_type=post-timeline4.6238.44

Server storage [IO: ▲14.78MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 205 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Post Timeline: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.72 ▲0.162.14 ▲0.0536.72 ▼4.12
Dashboard /wp-admin2,236 ▲625.60 ▲0.0283.19 ▼6.3468.72 ▲26.70
Posts /wp-admin/edit.php2,144 ▲441.99 ▲0.0334.49 ▼3.6434.73 ▲0.61
Add New Post /wp-admin/post-new.php7,393 ▲5,86722.99 ▼0.181,043.19 ▲369.3539.45 ▼15.04
Media Library /wp-admin/upload.php1,444 ▲444.19 ▼0.06103.77 ▼7.9276.71 ▲28.24
Tags /wp-admin/edit-tags.php?taxonomy=ptl_tag&post_type=post-timeline8,1214.5273.8531.82
Dashboard /wp-admin/edit.php?post_type=post-timeline&page=ptl-dashboard7,9255.42109.3658.24
All Timeline Post /wp-admin/edit.php?post_type=post-timeline8,0125.77116.5838.28
Create Custom Post Type /wp-admin/options-writing.php?page=ptl-cpt-form280.420.073.19
Add New /wp-admin/post-new.php?post_type=post-timeline15,43512.52433.31134.18
Timeline Settings /wp-admin/edit.php?post_type=post-timeline&page=timeline-settings10,5004.64220.2864.60
Categories /wp-admin/edit-tags.php?taxonomy=ptl_categories&post_type=post-timeline1,3182.1226.6232.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/post-timeline/public/partials/modal-popup.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category_Checklist' not found in wp-content/plugins/post-timeline/includes/components/radio-walker.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/ptl-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/admin-fields.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/shortcode-cpt.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/shortcode-ptl.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/multiple-templates.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/post-timeline/public/partials/post-timeline-page.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PostTimeline\\Layouts\\Base' not found in wp-content/plugins/post-timeline/includes/layouts/layout-5.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/post-timeline/admin/partials/shortcode-popup-html.php:6
    • > PHP Warning
      Use of undefined constant POST_TIMELINE_SITE - assumed 'POST_TIMELINE_SITE' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-timeline/admin/partials/multiple-templates.php on line 9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ptl_tag&post_type=post-timeline
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/post-timeline/admin/js/timeline_script.js?ver=2.2.7:843:48)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ptl_tag&post_type=post-timeline
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).sortable is not a function
    • > GET request to /wp-admin/options-writing.php?page=ptl-cpt-form
    • > Network (severe)
    wp-admin/options-writing.php?page=ptl-cpt-form - Failed to load resource: the server responded with a status of 403 (Forbidden)

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 need to be fixed: The official readme.txt is a good inspiration

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

"Post Timeline" version 2.2.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin107,173 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
CSS181,55562857,707
JavaScript165,6853,71635,709
PHP331,5321,6785,034
PO File61,8022,1464,082
Sass1201182,392
JSON4001,688
SVG310302
HTML100259

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity27.62
▷ Minimum class complexity1.00
▷ Maximum class complexity176.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods157
▷ Static methods2012.74%
▷ Public methods13183.44%
▷ Protected methods63.82%
▷ Private methods2012.74%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
63 PNG files occupy 2.89MB with 1.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/dashboard/premium-side-image.png247.19KB77.45KB▼ 68.67%
admin/images/dashboard/work-icon2.png5.05KB1.40KB▼ 72.33%
admin/images/dashboard/lock.png129.01KB48.15KB▼ 62.67%
admin/images/dashboard/primium/get_support_img.png2.76KB2.57KB▼ 7.03%
admin/images/banners/template-4.png37.34KB14.07KB▼ 62.31%