78% wp-scheduled-themes

Code Review | WP Scheduled Themes

WordPress plugin WP Scheduled Themes scored78%from 54 tests.

About plugin

  • Plugin page: wp-scheduled-themes
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Apr 16, 2011
  • Latest release: Apr 26, 2015
  • Number of updates: 31
  • Update frequency: every 47.5 days
  • Top authors: wpgwiggum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.99ms] Passed 4 tests

Analyzing server-side resources used by WP Scheduled Themes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.56 ▲4.26
Dashboard /wp-admin3.34 ▲0.0347.73 ▲2.04
Posts /wp-admin/edit.php3.45 ▲0.0951.76 ▲3.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.62 ▼5.85
Media Library /wp-admin/upload.php3.26 ▲0.0339.79 ▲7.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 7 new options
New tables
wp_scheduledthemes
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
scheduledthemes_db_version
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Scheduled Themes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.12 ▼0.151.61 ▼0.1347.46 ▲6.75
Dashboard /wp-admin2,202 ▲225.62 ▲0.0586.92 ▼4.2041.35 ▼1.03
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0236.07 ▼2.8229.36 ▼4.82
Add New Post /wp-admin/post-new.php1,530 ▲223.04 ▲0.11597.55 ▼23.3452.02 ▼12.99
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.00102.39 ▼3.3143.00 ▼5.03
Scheduled Themes /wp-admin/scheduledThemes.php260.420.0711.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • scheduledthemes_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-scheduled-themes/scheduledThemes.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/wp-scheduled-themes/uninstall.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-scheduled-themes/scheduledThemes.php:43
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-scheduled-themes/uninstall.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-scheduled-themes/warning.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-scheduled-themes/adminPage.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/scheduledThemes.php
    • > Network (severe)
    wp-admin/scheduledThemes.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: schedule, holiday, scheduled, theme, cron...

wp-scheduled-themes/scheduledThemes.php 92% from 13 tests

"WP Scheduled Themes" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-scheduled-themes.php" instead of "scheduledThemes.php")

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
There were no executable files found in this plugin2,256 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3942221,461
CSS23260327
PHP43997309
PO File34545159

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.22
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
15 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/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/ui-bg_glass_75_d0e5f5_1x400.png0.12KB0.16KB0.00%
css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png0.10KB0.13KB0.00%
css/images/ui-icons_469bdd_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png3.38KB1.68KB▼ 50.10%