84% fire-department-shift-calendar

Code Review | Fire Department Shift Calendar

WordPress plugin Fire Department Shift Calendar scored84%from 54 tests.

About plugin

  • Plugin page: fire-department-s...
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 24, 2018
  • Latest release: Feb 29, 2020
  • Number of updates: 10
  • Update frequency: every 46.4 days
  • Top authors: marksalvadore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.61ms] Passed 4 tests

This is a short check of server-side resources used by Fire Department Shift Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.69 ▼1.77
Dashboard /wp-admin3.43 ▲0.1250.29 ▼3.18
Posts /wp-admin/edit.php3.54 ▲0.1845.91 ▼1.25
Add New Post /wp-admin/post-new.php6.01 ▲0.1284.07 ▼8.24
Media Library /wp-admin/upload.php3.35 ▲0.1237.49 ▲0.75

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 95 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_fd_shift_calendar_widget
widget_recent-comments

Browser metrics Passed 4 tests

Fire Department Shift Calendar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.28 ▼1.132.12 ▲0.2240.19 ▼3.29
Dashboard /wp-admin2,235 ▲445.84 ▲0.97103.20 ▲0.1038.25 ▼1.99
Posts /wp-admin/edit.php2,121 ▲291.99 ▼0.1335.95 ▼0.0530.91 ▼3.12
Add New Post /wp-admin/post-new.php1,527 ▼1517.58 ▼0.60680.37 ▲37.2458.12 ▼3.49
Media Library /wp-admin/upload.php1,420 ▲324.14 ▼0.09109.90 ▼1.6747.47 ▲3.59

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_fd_shift_calendar_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fire-department-shift-calendar/functions/menu.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fire-department-shift-calendar/functions/enqueues.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fire-department-shift-calendar/functions/calendar.php:386
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/fire-department-shift-calendar/functions/shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fire-department-shift-calendar/fd-shift-calendar.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fire-department-shift-calendar/functions/widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fire-department-shift-calendar/functions/admin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: fire, calendar, widget, shift, department

fire-department-shift-calendar/fd-shift-calendar.php 85% from 13 tests

The primary PHP file in "Fire Department Shift Calendar" version 0.9.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fire-department-shift-calendar.php" instead of "fd-shift-calendar.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin783 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP818693672
JavaScript7011071
JSON10022
SVG11013
CSS50105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin