78% wp-responsive-timeline

Code Review | WP Responsive Timeline

WordPress plugin WP Responsive Timeline scored78%from 54 tests.

About plugin

  • Plugin page: wp-responsive-tim...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.5.3
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Jun 26, 2016
  • Number of updates: 11
  • Update frequency: every 14.2 days
  • Top authors: abiralneupane (63.64%)subedimadhu (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.42ms] Passed 4 tests

Server-side resources used by WP Responsive Timeline
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.99 ▼4.46
Dashboard /wp-admin3.38 ▲0.0847.62 ▼7.90
Posts /wp-admin/edit.php3.50 ▲0.1448.63 ▼4.47
Add New Post /wp-admin/post-new.php5.98 ▲0.1094.67 ▼0.86
Media Library /wp-admin/upload.php3.31 ▲0.0842.71 ▲5.33
Add New /wp-admin/post-new.php?post_type=wp-timeline3.4548.74
Timelines /wp-admin/edit.php?post_type=wp-timeline3.3543.34

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Responsive Timeline
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8613.64 ▼1.051.62 ▲0.0239.84 ▼5.39
Dashboard /wp-admin2,251 ▲484.92 ▲0.0299.47 ▼2.5139.68 ▼2.34
Posts /wp-admin/edit.php2,130 ▲302.09 ▲0.1135.03 ▼0.8034.31 ▲0.60
Add New Post /wp-admin/post-new.php1,552 ▲2123.49 ▲0.35672.95 ▼12.5466.51 ▲6.66
Media Library /wp-admin/upload.php1,432 ▲324.45 ▲0.23114.70 ▲7.7449.14 ▼0.24
Add New /wp-admin/post-new.php?post_type=wp-timeline2,5807.98170.6569.35
Timelines /wp-admin/edit.php?post_type=wp-timeline1,1362.0132.8031.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-responsive-timeline/wp-responsive-timeline.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_part() in wp-content/plugins/wp-responsive-timeline/templates/timeline-vertical-shortcode.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-responsive-timeline/templates/timeline-vertical.php:1
    • > PHP Notice
      Undefined variable: wprt_posts in wp-content/plugins/wp-responsive-timeline/templates/timeline-vertical-shortcode.php on line 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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: wordpress, wp timeline, timeline plugin, responsive timeline, vertical timeline...

wp-responsive-timeline/wp-responsive-timeline.php 92% from 13 tests

The main PHP file in "WP Responsive Timeline" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin735 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS25417365
PHP117011351
JavaScript14219

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.60
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods633.33%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/ui-icons.png6.93KB4.18KB▼ 39.62%