78% publish-to-schedule

Code Review | Publish to Schedule

WordPress plugin Publish to Schedule scored78%from 54 tests.

About plugin

  • Plugin page: publish-to-schedule
  • Plugin version: 4.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2012
  • Latest release: Feb 27, 2023
  • Number of updates: 59
  • Update frequency: every 68.5 days
  • Top authors: alexbenfica (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

7,000+ active /53,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Publish to Schedule
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.55 ▲1.93
Dashboard /wp-admin3.32 ▲0.0146.18 ▼1.10
Posts /wp-admin/edit.php3.37 ▲0.0147.71 ▼4.96
Add New Post /wp-admin/post-new.php5.45 ▼0.4477.92 ▼21.18
Media Library /wp-admin/upload.php3.24 ▲0.0132.49 ▼3.71
Publish to Schedule /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php3.1931.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Publish to Schedule
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.204.54 ▲2.8443.49 ▲2.93
Dashboard /wp-admin2,207 ▲165.83 ▲0.96104.78 ▲0.6636.63 ▼7.85
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0240.15 ▼1.2935.76 ▼3.90
Add New Post /wp-admin/post-new.php6,374 ▲4,86019.90 ▲2.26998.44 ▲397.7939.92 ▼11.96
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0298.48 ▲2.7141.29 ▼1.97
Publish to Schedule /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php1,1482.0949.4733.64

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • publish-to-schedule
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_0
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_1
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_2
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_3
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_4
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_5
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php+213
    Undefined index: pts_6
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=publish-to-schedule/publish-to-schedule-admin.php
    • > Notice in wp-content/plugins/publish-to-schedule/pts-analytics.php+25
    Undefined index: pts_statistics_total_work

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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_textdomain() in wp-content/plugins/publish-to-schedule/publish-to-schedule.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/publish-to-schedule/pts-metabox.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/publish-to-schedule/publish-to-schedule-admin.php:23

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 93% 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Configuration to choose which day of week post can be scheduled.), #2 (Set the period of day in which post may be scheduled. Simple like that.), #3 (This is what you'll see while write your post: the date that post will be automatically schedule, and why! To see less information change the related option in the plugin configuration.)
The official readme.txt is a good inspiration

publish-to-schedule/publish-to-schedule.php Passed 13 tests

The main PHP file in "Publish to Schedule" ver. 4.5.5 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
Just write! Let this plugins AUTO-schedule all posts for you! Configure once, use forever!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,255 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7452211742
PO File2171188469
Bourne Shell2222531
XML1009
Markdown1104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.41MB with 0.26MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png134.74KB51.39KB▼ 61.86%
assets/banner-772x250.png286.73KB99.20KB▼ 65.40%