78% auto-scheduling

Code Review | Auto Schedule

WordPress plugin Auto Schedule scored78%from 54 tests.

About plugin

  • Plugin page: auto-scheduling
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2017
  • Latest release: Dec 6, 2017
  • Number of updates: 7
  • Update frequency: every 4.0 days
  • Top authors: hernantas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /805 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.11MB] [CPU: ▼7.70ms] Passed 4 tests

A check of server-side resources used by Auto Schedule
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.52 ▲2.35
Dashboard /wp-admin3.25 ▼0.0532.55 ▼15.64
Posts /wp-admin/edit.php3.32 ▼0.0335.79 ▼5.90
Add New Post /wp-admin/post-new.php5.49 ▼0.3980.60 ▼7.74
Media Library /wp-admin/upload.php3.26 ▲0.0330.64 ▼1.51
Auto Schedule /wp-admin/options-general.php?page=auto-schedule3.2330.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Auto Schedule
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.091.86 ▲0.2540.58 ▲2.45
Dashboard /wp-admin2,210 ▲195.88 ▲0.07104.14 ▼13.5440.38 ▼5.74
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0337.33 ▲1.9634.40 ▲3.51
Add New Post /wp-admin/post-new.php1,545 ▲3118.10 ▲0.50618.90 ▼49.6551.79 ▼10.42
Media Library /wp-admin/upload.php1,392 ▲14.24 ▼0.1395.47 ▼7.1439.43 ▼3.29
Auto Schedule /wp-admin/options-general.php?page=auto-schedule2,3562.1923.3927.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=auto-schedule
    • > Notice in wp-content/plugins/auto-scheduling/functions/plugins.php+18
    Undefined variable: new_edit

SRP 50% from 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
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: Call to undefined function settings_fields() in wp-content/plugins/auto-scheduling/views/admin_page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/auto-scheduling/autoschedule.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
6 plugin tags: future, schedule, custom, default, automatic...

auto-scheduling/autoschedule.php 92% from 13 tests

The primary PHP file in "Auto Schedule" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("auto-scheduling.php" instead of "autoschedule.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
Good job! No executable or dangerous file extensions detected893 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
Markdown11210553
PHP43720247
JavaScript120093

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.00
▷ Minimum class complexity7.00
▷ Maximum class complexity23.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1676.19%
▷ Protected methods00.00%
▷ Private methods523.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected