84% presswell-publication-schedule

Code Review | Presswell Publication Schedule

WordPress plugin Presswell Publication Schedule scored84%from 54 tests.

About plugin

  • Plugin page: presswell-publica...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Jun 13, 2019
  • Number of updates: 12
  • Update frequency: every 45.9 days
  • Top authors: presswell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.60MB] [CPU: ▼20.63ms] Passed 4 tests

A check of server-side resources used by Presswell Publication Schedule
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.40 ▼1.18
Dashboard /wp-admin3.40 ▲0.1049.20 ▼3.67
Posts /wp-admin/edit.php3.52 ▲0.1650.60 ▼1.64
Add New Post /wp-admin/post-new.php3.23 ▼2.6629.04 ▼76.03
Media Library /wp-admin/upload.php3.33 ▲0.1039.09 ▲1.81
Publication Schedule /wp-admin/options-general.php?page=presswell-publication-schedule-settings3.3034.05

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
pwps_settings
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Presswell Publication Schedule: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.31 ▼0.331.69 ▼0.2640.37 ▼6.46
Dashboard /wp-admin2,199 ▲255.64 ▲0.0590.65 ▲1.6738.00 ▼10.21
Posts /wp-admin/edit.php2,121 ▲182.03 ▲0.0242.83 ▲2.9136.38 ▲1.75
Add New Post /wp-admin/post-new.php1,536 ▼123.17 ▲4.76667.54 ▲18.6852.00 ▼11.66
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.04105.37 ▲5.4245.62 ▲0.41
Publication Schedule /wp-admin/options-general.php?page=presswell-publication-schedule-settings9881.8230.4028.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • pwps_settings
    • theysaidso_admin_options

Smoke tests 75% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/presswell-publication-schedule/includes/admin/templates/fields/times.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/presswell-publication-schedule/includes/admin/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/presswell-publication-schedule/includes/admin/templates/fields/days.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: future, schedule, publish, auto-schedule, posts

presswell-publication-schedule/presswell-publication-schedule.php Passed 13 tests

The main file in "Presswell Publication Schedule" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
Simple and precise post publishing control for WordPress based on day of the week and time of day.

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 detected548 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP516649546
CSS1001
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity34.50
▷ Minimum class complexity14.00
▷ Maximum class complexity55.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin