48% weekly-schedule

Code Review | Weekly Schedule

WordPress plugin Weekly Schedule scored48%from 54 tests.

About plugin

  • Plugin page: weekly-schedule
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.8
  • WordPress version: 6.3.1
  • First release: Sep 8, 2009
  • Latest release: Nov 7, 2021
  • Number of updates: 111
  • Update frequency: every 42.1 days
  • Top authors: jackdewey (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /54,828 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.75ms] Passed 4 tests

Server-side resources used by Weekly Schedule
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.79 ▲2.06
Dashboard /wp-admin3.33 ▼0.0244.22 ▼16.94
Posts /wp-admin/edit.php3.38 ▲0.0245.23 ▲1.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.82 ▼11.36
Media Library /wp-admin/upload.php3.25 ▲0.0236.96 ▲0.22
General Options /wp-admin/admin.php?page=weekly-schedule3.2133.93
Stylesheet /wp-admin/admin.php?page=weekly-schedule-stylesheet3.9345.09

Server storage [IO: ▲0.60MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: 2 new tables, 11 new options
New tables
wp_wsdays
wp_wscategories
New WordPress options
WS_PP2
WS_PP1
widget_recent-posts
WS_PP
widget_theysaidso_widget
can_compress_scripts
db_upgraded
WeeklyScheduleGeneral
widget_weekly_schedule_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Weekly Schedule
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.37 ▲0.011.66 ▲0.2148.21 ▲7.98
Dashboard /wp-admin2,221 ▲445.77 ▲0.2481.76 ▼8.2781.57 ▲41.07
Posts /wp-admin/edit.php2,132 ▲321.97 ▲0.0338.43 ▲4.1833.25 ▼5.74
Add New Post /wp-admin/post-new.php1,702 ▲17422.31 ▼1.04677.09 ▲1.8552.70 ▲3.25
Media Library /wp-admin/upload.php1,423 ▲294.07 ▼0.07107.67 ▼0.1879.84 ▲32.31
General Options /wp-admin/admin.php?page=weekly-schedule2,0182.1326.0331.60
Stylesheet /wp-admin/admin.php?page=weekly-schedule-stylesheet1,3243.7683.9040.22

Uninstaller [IO: ▲0.60MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/weekly-schedule/uninstall.php+8
    Cannot redeclare ws_db_prefix() (previously declared in wp-content/plugins/weekly-schedule/weekly-schedule.php:122)
  • Incomplete uninstall procedure, leaving 25 files (0.60MB) in the plugin directory
    • (new file) icons/calendar-icon-16.png
    • (new file) jquery-qtip/jquery.qtip.min.js
    • (new file) jquery-qtip/LICENSE
    • (new file) float-thead/jquery.floatThead.min.js
    • (new file) jquery-qtip/imagesloaded.pkg.min.js
    • (new file) icons/btn_donate_LG.gif
    • (new file) icons/calendar-icon-32.png
    • (new file) importtemplate.csv
    • (new file) jquery-qtip/jquery.qtip.min.css
    • (new file) icons/delete.png
    • ...
  • Zombie tables were found after uninstall: 2 tables
    • wp_wsdays
    • wp_wscategories
  • This plugin does not fully uninstall, leaving 12 options in the database
    • WS_PP1
    • theysaidso_admin_options
    • WS_PP
    • widget_weekly_schedule_widget
    • WeeklyScheduleGeneral
    • widget_theysaidso_widget
    • WS_PP2
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/weekly-schedule/weekly-schedule.php:39

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)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=weekly-schedule
    • > Network (severe)
    wp-admin/images/gray-grad.png - 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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (A sample schedule created with Weekly Schedule), #2 (General Plugin Configuration), #3 (Manage and add items to the schedule)
You can take inspiration from this readme.txt

weekly-schedule/weekly-schedule.php Passed 13 tests

The main file in "Weekly Schedule" v. 3.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Simplify the management and display of online schedule grids

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin5,176 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP67781,1434,648
PO File1151156376
CSS261147
JavaScript31195

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 188)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity175.40
▷ Minimum class complexity52.00
▷ Maximum class complexity286.00
Average method complexity11.13
▷ Minimum method complexity1.00
▷ Maximum method complexity188.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods86
▷ Static methods11.16%
▷ Public methods86100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/delete.png0.70KB0.72KB0.00%
icons/calendar-icon-32.png2.85KB1.82KB▼ 36.10%
icons/calendar-icon-16.png0.98KB1.21KB0.00%