78% automatic-post-publishing-scheduler

Code Review | Automatic Post Publishing Scheduler

WordPress plugin Automatic Post Publishing Scheduler scored 78% from 53 tests.

About plugin

  • Plugin page: automatic-post-pu...
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.4.1
  • WordPress version: 5.8.1
  • First release: Nov 28, 2013
  • Latest release: Jan 25, 2016
  • Number of updates: 26
  • Update frequency: every 30.3 days
  • Top authors: WilltheWebMechanic (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

100+ active / 8,880 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼261.57ms] Passed 4 tests

An overview of server-side resources used by Automatic Post Publishing Scheduler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2830.20 ▲8.21
Dashboard /wp-admin3.23 ▲0.1843.41 ▲2.31
Posts /wp-admin/edit.php3.32 ▲0.2146.05 ▲2.43
Add New Post /wp-admin/post-new.php5.59 ▲0.1688.48 ▼1,042.30
Media Library /wp-admin/upload.php3.17 ▲0.1730.33 ▼8.72
WtWM Plugins /wp-admin/admin.php?page=wwm_plugins3.1527.93

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 1 new option
New WordPress options
publish_scheduler_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Automatic Post Publishing Scheduler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,724 ▲11816.21 ▲0.708.81 ▲1.0548.43 ▼1.46
Dashboard /wp-admin2,977 ▲1276.86 ▲0.99132.31 ▲0.90139.65 ▲35.84
Posts /wp-admin/edit.php2,775 ▲692.76 ▲0.0868.44 ▼0.71120.57 ▲32.83
Add New Post /wp-admin/post-new.php2,090 ▲43916.35 ▼1.12406.61 ▲52.37123.14 ▲16.22
Media Library /wp-admin/upload.php1,767 ▼85.18 ▲0.18126.43 ▼24.27135.60 ▲22.46
WtWM Plugins /wp-admin/admin.php?page=wwm_plugins1,1142.5250.2159.82
Scheduler /wp-admin/PublishSchedule.php260.900.0913.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • publish_scheduler_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-post-publishing-scheduler/automatic-post-publishing-scheduler.php:52

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wwm_plugins
    • > Network (severe)
    https://www.coinbase.com/assets/button.js - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/PublishSchedule.php
    • > Network (severe)
    wp-admin/PublishSchedule.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (The admin menu item that this plugin creates and the links to the plugin settings/configuration.), #2 (Time slot configuration - simple!.), #3 (Configuration of allowed/disallowed days of the week.), #4 (Configuration of explicitly allowed/disallowed dates.), #5 (The datepicker implementation.), #6 (The 'Publish Now' link - available only to Admin users.), #7 (The "Quick Edit" interface. Admin users can override scheduled time/date here.)
Please take inspiration from this readme.txt

automatic-post-publishing-scheduler/automatic-post-publishing-scheduler.php Passed 13 tests

The main PHP file in "Automatic Post Publishing Scheduler" ver. 2.1.6 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
Replaces default publishing with queued publishing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,075 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP185232716
JavaScript4221177
Markdown1540114
CSS310568

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity161.00
▷ Minimum class complexity161.00
▷ Maximum class complexity161.00
Average method complexity8.27
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
34 PNG files occupy 0.80MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
css/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-1.png87.10KB28.93KB▼ 66.78%