78% wp-homepage-scheduler

Code Review | WP Homepage Scheduler

WordPress plugin WP Homepage Scheduler scored 78% from 54 tests.

About plugin

  • Plugin page: wp-homepage-sched...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Oct 29, 2015
  • Number of updates: 5
  • Update frequency: every 4.2 days
  • Top authors: helgesverre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼15.89ms] Passed 4 tests

Server-side resources used by WP Homepage Scheduler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0335.77 ▼7.27
Dashboard /wp-admin3.34 ▲0.0346.40 ▼5.98
Posts /wp-admin/edit.php3.30 ▼0.0540.69 ▼4.80
Add New Post /wp-admin/post-new.php4.70 ▼1.1947.61 ▼45.52
Media Library /wp-admin/upload.php3.26 ▲0.0335.84 ▲0.19
WP Homepage Scheduler /wp-admin/options-general.php?page=wp_homepage_scheduler3.2332.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 105 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Homepage Scheduler
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.481.75 ▼0.4345.15 ▲0.30
Dashboard /wp-admin2,210 ▲215.84 ▲0.90106.41 ▼8.0141.83 ▼2.39
Posts /wp-admin/edit.php1,167 ▼9191.53 ▼0.467.63 ▼27.3030.17 ▼4.77
Add New Post /wp-admin/post-new.php45 ▼1,4900.44 ▼22.940.07 ▼650.559.74 ▼39.60
Media Library /wp-admin/upload.php1,392 ▲14.20 ▲0.0296.56 ▼2.2485.78 ▲42.08
WP Homepage Scheduler /wp-admin/options-general.php?page=wp_homepage_scheduler8482.6348.4129.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_homepage_scheduler
    • > Notice in wp-content/plugins/wp-homepage-scheduler/wp-schedule-homepage.php+115
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_homepage_scheduler
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=6.3.1 1:28609 "jQuery.Deferred exception: Unexpected end of JSON input" "SyntaxError: Unexpected end of JSON input\n at JSON.parse (\u003Canonymous>)\n at loadEvents (/wp-content/plugins/wp-homepage-scheduler/assets/js/custom.js?ver=6.3.1:12:21)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-homepage-scheduler/assets/js/custom.js?ver=6.3.1:49:17)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&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,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp_homepage_scheduler
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog&ver=6.3.1 1:28721 Uncaught SyntaxError: Unexpected end of JSON input

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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-homepage-scheduler === )
  • Screenshots: Screenshot #1 (You can add, edit and delete pages in your schedule) image not found
The official readme.txt is a good inspiration

wp-homepage-scheduler/wp-schedule-homepage.php 92% from 13 tests

This is the main PHP file of "WP Homepage Scheduler" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-homepage-scheduler.php" instead of "wp-schedule-homepage.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
Everything looks great! No dangerous files found in this plugin17,296 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript584,1633,18414,030
CSS113553103,129
PHP15341137

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.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
31 PNG files occupy 0.22MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/lib/cupertino/images/ui-icons_3d80b3_256x240.png4.49KB4.18KB▼ 6.89%
assets/js/lib/cupertino/images/ui-icons_ffffff_256x240.png6.32KB4.18KB▼ 33.80%
assets/css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
assets/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/js/lib/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png0.36KB0.14KB▼ 60.65%