84% wc-schedule-widget

Code Review | WC Schedule Widget

WordPress plugin WC Schedule Widget scored84%from 54 tests.

About plugin

  • Plugin page: wc-schedule-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: May 6, 2016
  • Latest release: May 1, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: hideokamoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.67ms] Passed 4 tests

A check of server-side resources used by WC Schedule Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.55 ▼3.93
Dashboard /wp-admin3.38 ▲0.0356.34 ▼16.70
Posts /wp-admin/edit.php3.43 ▲0.0749.04 ▼4.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.77 ▼5.90
Media Library /wp-admin/upload.php3.30 ▲0.0738.22 ▲2.21

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_wordcamp_scheduler_widget
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WC Schedule Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.171.72 ▼0.1143.56 ▲1.05
Dashboard /wp-admin2,198 ▲245.62 ▲0.0890.67 ▼7.4442.96 ▼3.82
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0440.03 ▼1.0634.89 ▲0.79
Add New Post /wp-admin/post-new.php1,526 ▼523.52 ▲0.51652.19 ▲38.6959.24 ▲6.11
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0099.78 ▼6.3345.69 ▲1.23

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_wordcamp_scheduler_widget

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wc-schedule-widget/includes/class/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wc-schedule-widget/includes/class/widget.php:2

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 Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: wordcamp, widget

wc-schedule-widget/wc-scheduler.php 85% from 13 tests

The principal PHP file in "WC Schedule Widget" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-schedule-widget.php" instead of "wc-scheduler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin339 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34940339

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods430.77%
▷ Protected methods00.00%
▷ Private methods969.23%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin