83% timeline-diagram

Code Review | Time Line Diagram

WordPress plugin Time Line Diagram scored83%from 54 tests.

About plugin

  • Plugin page: timeline-diagram
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2016
  • Latest release: Mar 8, 2016
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: Md. Shiddikur Rahman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.45ms] Passed 4 tests

Analyzing server-side resources used by Time Line Diagram
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.36 ▼3.81
Dashboard /wp-admin3.34 ▲0.0443.47 ▼6.25
Posts /wp-admin/edit.php3.40 ▲0.0444.52 ▼1.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.64 ▼14.40
Media Library /wp-admin/upload.php3.27 ▲0.0439.74 ▲3.29
Add New Time Line Item /wp-admin/post-new.php?post_type=time-line3.3946.00
All Time Line Items /wp-admin/edit.php?post_type=time-line3.3135.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Time Line Diagram
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.34 ▼1.058.46 ▲6.9639.32 ▼1.25
Dashboard /wp-admin2,225 ▲445.58 ▼0.1692.11 ▼9.0139.83 ▼3.84
Posts /wp-admin/edit.php2,127 ▲272.11 ▲0.1538.94 ▲3.2837.31 ▼0.34
Add New Post /wp-admin/post-new.php1,558 ▲3018.42 ▼4.85638.83 ▼22.4366.17 ▲13.91
Media Library /wp-admin/upload.php1,427 ▲274.10 ▼0.14108.82 ▼4.9146.20 ▼2.21
Add New Time Line Item /wp-admin/post-new.php?post_type=time-line2,1897.61175.1264.42
All Time Line Items /wp-admin/edit.php?post_type=time-line1,1001.9730.2530.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/timeline-diagram/time_line_wordpress_main.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/timeline-diagram/time_line_wordpress_main.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Demo Screenshots 1.), #2 (Demo Screenshots 2.), #3 (admin panel plugin option.)
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

timeline-diagram/time_line_wordpress_main.php 92% from 13 tests

This is the main PHP file of "Time Line Diagram" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("timeline-diagram.php" instead of "time_line_wordpress_main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin566 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript363126274
CSS120211
PHP1101681

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin