10% content-scheduler

Code Review | Content Scheduler

WordPress plugin Content Scheduler scored10%from 54 tests.

About plugin

  • Plugin page: content-scheduler
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2010
  • Latest release: Dec 26, 2014
  • Number of updates: 129
  • Update frequency: every 11.6 days
  • Top authors: freakingid (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /28,800 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+8
    Constant PEK_CONTENT_SCHEDULER_VERSION already defined

Server metrics [RAM: ▼1.61MB] [CPU: ▼58.74ms] Passed 4 tests

Server-side resources used by Content Scheduler
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.00 ▼1.81
Dashboard /wp-admin2.35 ▼1.0013.23 ▼52.99
Posts /wp-admin/edit.php2.35 ▼1.018.26 ▼47.72
Add New Post /wp-admin/post-new.php2.35 ▼3.549.29 ▼106.18
Media Library /wp-admin/upload.php2.35 ▼0.897.31 ▼28.08
Content Scheduler /wp-admin/options-general.php?page=content_scheduler2.358.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
ContentScheduler_Options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Scheduler
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.20 ▲0.221.60 ▼0.1941.45 ▼0.24
Dashboard /wp-admin2,202 ▲315.64 ▼0.0390.59 ▲0.8737.43 ▼4.35
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0740.33 ▼2.3636.34 ▼0.76
Add New Post /wp-admin/post-new.php6,259 ▲4,73318.98 ▲1.42955.30 ▲333.2663.19 ▲5.79
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.07108.07 ▼0.4945.24 ▲1.18
Content Scheduler /wp-admin/options-general.php?page=content_scheduler1,1201.7125.2931.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+8
    Constant PEK_CONTENT_SCHEDULER_VERSION already defined
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • ContentScheduler_Options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+8
    Constant PEK_CONTENT_SCHEDULER_VERSION already defined
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+439
    Undefined index: def-hours
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+440
    Undefined index: def-days
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > Notice in wp-content/plugins/content-scheduler/content-scheduler-settings.php+441
    Undefined index: def-weeks
    • > GET request to /wp-admin/options-general.php?page=content_scheduler
    • > Warning in wp-admin/includes/template.php+1824
    call_user_func() expects parameter 1 to be a valid callback, class 'Content_Scheduler_Settings' does not have a method 'cs_view_cron_settings'

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
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: why_notify in wp-content/plugins/content-scheduler/includes/send-notifications.php on line 10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/content-scheduler/includes/process-post.php:6
    • > PHP Notice
      Undefined variable: postid in wp-content/plugins/content-scheduler/includes/process-page.php on line 4
    • > PHP Notice
      Undefined variable: why_notify in wp-content/plugins/content-scheduler/includes/send-notifications.php on line 14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/content-scheduler/includes/process-expirations.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/content-scheduler/includes/update-postmeta-expiration-values.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/content-scheduler/includes/process-page.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/content-scheduler/includes/process-notifications.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/content-scheduler/includes/update-minlevel-options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-scheduler/includes/send-notifications.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The Content Scheduler options screen, where you determine what happens when the expiration date is reached.), #2 (Content Scheduler can optionally display the expiraton date and status in a column where your Posts and Pages are listed.), #3 (Scheduling content expiration uses a small, unobtrusive box on your Post and Pages edit screens.)
The official readme.txt might help

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

This is the main PHP file of "Content Scheduler" version 2.0.5, 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:
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin3,557 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22052861,734
PHP141768141,607
PO File19095202
CSS22511
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity39.33
▷ Minimum class complexity11.00
▷ Maximum class complexity69.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods64
▷ Static methods34.69%
▷ Public methods6093.75%
▷ Protected methods34.69%
▷ Private methods11.56%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.21MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
js/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
js/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
js/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-3.png35.89KB19.01KB▼ 47.04%