78% timed-content

Code Review | Timed Content

WordPress plugin Timed Content scored78%from 54 tests.

About plugin

  • Plugin page: timed-content
  • Plugin version: 2.77
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Mar 1, 2011
  • Latest release: Aug 14, 2023
  • Number of updates: 210
  • Update frequency: every 21.7 days
  • Top authors: awelzel (66.19%)kjvtough (34.29%)

Code review

54 tests

User reviews

41 reviews

Install metrics

8,000+ active /150,806 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 gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.79ms] Passed 4 tests

An overview of server-side resources used by Timed Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.92 ▼5.79
Dashboard /wp-admin3.41 ▲0.1145.46 ▼3.75
Posts /wp-admin/edit.php3.45 ▲0.0947.98 ▲3.16
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.39 ▲5.70
Media Library /wp-admin/upload.php3.32 ▲0.0935.96 ▲3.20
Add new /wp-admin/post-new.php?post_type=timed_content_rule3.3942.10
Timed Content rules /wp-admin/edit.php?post_type=timed_content_rule3.3834.80

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Timed Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.59 ▼0.967.81 ▲6.1843.83 ▼0.19
Dashboard /wp-admin2,242 ▲654.88 ▼1.00111.00 ▲6.7143.86 ▲0.44
Posts /wp-admin/edit.php2,121 ▲292.04 ▲0.0340.15 ▼1.2035.87 ▼3.15
Add New Post /wp-admin/post-new.php1,545 ▲1717.72 ▼0.51618.79 ▼4.0762.40 ▲9.91
Media Library /wp-admin/upload.php1,420 ▲354.22 ▲0.04102.89 ▼0.2541.51 ▼2.94
Add new /wp-admin/post-new.php?post_type=timed_content_rule4,3034.44137.0763.90
Timed Content rules /wp-admin/edit.php?post_type=timed_content_rule1,1452.4947.9828.46

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _ex() in wp-content/plugins/timed-content/tinymce_plugin/dialog.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=timed_content_rule
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28609 "jQuery.Deferred exception: timed_content_rule_exceptions_dates_picker is not defined" "ReferenceError: timed_content_rule_exceptions_dates_picker is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/timed-content/js/timed-content-admin.js?ver=2.77:72:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&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,jquery-ui-core&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=timed_content_rule
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=6.3.1 1:28721 Uncaught ReferenceError: timed_content_rule_exceptions_dates_picker is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

timed-content/timed-content.php 92% from 13 tests

The main PHP script in "Timed Content" version 2.77 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 201 characters long)

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
No dangerous file extensions were detected6,820 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP42253332,812
JavaScript362282752,002
CSS462651,213
PO File1215263651
HTML1334110
SVG10027
Markdown1405

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.36
Average class complexity174.50
▷ Minimum class complexity86.00
▷ Maximum class complexity263.00
Average method complexity8.08
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/jqueryui/1.10.3/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
css/jqueryui/1.10.3/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/jqueryui/1.10.3/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
css/jqueryui/1.10.3/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
css/jqueryui/1.10.3/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%