78% wp-timetable

Code Review | Timetable

WordPress plugin Timetable scored78%from 54 tests.

About plugin

  • Plugin page: wp-timetable
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 31, 2017
  • Latest release: Nov 2, 2017
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: harrymumf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,697 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.53ms] Passed 4 tests

This is a short check of server-side resources used by Timetable
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.75 ▼4.00
Dashboard /wp-admin3.36 ▲0.0549.42 ▼7.55
Posts /wp-admin/edit.php3.47 ▲0.1144.56 ▼2.02
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.26 ▼0.54
Media Library /wp-admin/upload.php3.28 ▲0.0534.18 ▲0.46

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_timetable_widget
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Timetable: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9414.41 ▼0.041.90 ▼0.5146.26 ▼7.74
Dashboard /wp-admin2,230 ▲415.85 ▲0.90100.90 ▼10.1939.89 ▼4.03
Posts /wp-admin/edit.php2,113 ▲242.02 ▼0.0232.85 ▼6.0731.38 ▼3.75
Add New Post /wp-admin/post-new.php1,562 ▲2918.14 ▼5.20640.12 ▼27.1759.33 ▲2.91
Media Library /wp-admin/upload.php1,415 ▲274.20 ▲0.0195.33 ▼8.7242.36 ▼3.24

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_timetable_widget
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-timetable/timetable-widget.html.php
    • > /wp-content/plugins/wp-timetable/admin/timetable-splash.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-timetable/admin/timetable-admin.php:26
    • > PHP Notice
      Undefined variable: times in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 22
    • > PHP Notice
      Undefined variable: headings in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-timetable/timetable-widget.php:14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function timetable_options_title() in wp-content/plugins/wp-timetable/admin/timetable-options.php:3
    • > PHP Notice
      Undefined variable: second_headings in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 18
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-timetable/timetable-widget.html.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
6 plugin tags: table, wp, timetable, time, event...

wp-timetable/timetable.php 85% from 13 tests

"Timetable" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-timetable.php" instead of "timetable.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin368 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP998178265
CSS122397
Markdown1706

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
4 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
demo/timetable.png49.51KB14.65KB▼ 70.41%
assets/imgs/timetable-logo-cropped.png0.58KB0.75KB0.00%
demo/settings.png28.06KB15.66KB▼ 44.18%
assets/imgs/timetable-logo-cropped-yellow.png0.79KB0.75KB▼ 5.92%