84% pac-weekly-timetable

Code Review | PAC Weekly Timetable

WordPress plugin PAC Weekly Timetable scored84%from 54 tests.

About plugin

  • Plugin page: pac-weekly-timetable
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Jan 5, 2016
  • Number of updates: 6
  • Update frequency: every 15.5 days
  • Top authors: pietroamedeocigoli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼0.95ms] Passed 4 tests

Analyzing server-side resources used by PAC Weekly Timetable
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2046.86 ▲3.71
Dashboard /wp-admin3.51 ▲0.2154.55 ▼1.46
Posts /wp-admin/edit.php3.63 ▲0.2752.83 ▲1.99
Add New Post /wp-admin/post-new.php6.09 ▲0.2188.24 ▼8.02
Media Library /wp-admin/upload.php3.43 ▲0.2139.00 ▲4.32
All Activities /wp-admin/admin.php?page=pacwtt-settings-all-activities3.4135.88
PACWTT /wp-admin/admin.php?page=pacwtt-main3.4032.57
Add New /wp-admin/admin.php?page=pacwtt-settings-new-activities3.4034.03
Options /wp-admin/admin.php?page=pacwtt-settings-options3.4030.48

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: 2 new tables, 10 new options
New tables
wp_pacwtt_activity
wp_pacwtt_interval
New WordPress options
pacwtt_db_version
pacwtt_option_css
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
pacwtt_option_layout
can_compress_scripts
pacwtt_option_monday
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PAC Weekly Timetable
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.26 ▼1.172.29 ▲0.1642.22 ▼3.59
Dashboard /wp-admin2,241 ▲534.85 ▼1.01117.66 ▼0.5743.01 ▼0.00
Posts /wp-admin/edit.php2,127 ▲412.02 ▲0.0438.93 ▲0.2132.38 ▼0.42
Add New Post /wp-admin/post-new.php1,565 ▲3223.40 ▲0.58656.53 ▼10.2458.19 ▲9.22
Media Library /wp-admin/upload.php1,426 ▲384.20 ▲0.0095.99 ▼9.0541.93 ▼8.64
All Activities /wp-admin/admin.php?page=pacwtt-settings-all-activities1,0351.7624.2728.87
PACWTT /wp-admin/admin.php?page=pacwtt-main8032.1823.9428.36
Add New /wp-admin/admin.php?page=pacwtt-settings-new-activities8452.1827.4039.15
Options /wp-admin/admin.php?page=pacwtt-settings-options8992.0725.9534.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Please fix the following
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pac-weekly-timetable/pac-weekly-timetable.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pac-weekly-timetable/includes/class-pacwtt-model-interval.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pac-weekly-timetable/includes/class-pacwtt-model-activity.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pac-weekly-timetable/includes/shortcodes.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pac-weekly-timetable/includes/scripts.php:17
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/pac-weekly-timetable/includes/class-pacwtt-activity-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pac-weekly-timetable/css/tables.php:11
    • > PHP Notice
      Trying to get property 'is_404' of non-object in wp-content/plugins/pac-weekly-timetable/css/tables.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pac-weekly-timetable/includes/class-pacwtt-activity-list-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/pac-weekly-timetable/includes/class-pacwtt-activity-list-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Create a new activity from the plugin's menu page **Add New**), #2 (To manage an activity go to **All Activities** menu page and click on the activity name to manage it's intervals), #3 (Add a new interval or delete existing ones), #4 (Show a timetable using the [pacwtt] shortcode)
The official readme.txt might help

pac-weekly-timetable/pac-weekly-timetable.php 92% from 13 tests

This is the main PHP file of "PAC Weekly Timetable" version 0.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,399 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP82713211,009
PO File17992202
JavaScript12722116
CSS1172372

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.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 images were found in this plugin