74% taro-open-hour

Code Review |

WordPress plugin scored74%from 54 tests.

About plugin

  • Plugin page: taro-open-hour
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2017
  • Latest release: Jun 18, 2021
  • Number of updates: 20
  • Update frequency: every 73.9 days
  • Top authors: Tarosky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,551 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.44MB] [CPU: ▼5.98ms] Passed 4 tests

Server-side resources used by
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.4848.80 ▲1.04
Dashboard /wp-admin4.03 ▲0.4055.19 ▼11.29
Posts /wp-admin/edit.php4.08 ▲0.4057.28 ▲5.11
Add New Post /wp-admin/post-new.php6.64 ▲0.4989.39 ▼18.76
Media Library /wp-admin/upload.php3.95 ▲0.4647.20 ▲8.70
Add New /wp-admin/post-new.php?post_type=location4.1063.75
Locations /wp-admin/edit.php?post_type=location3.9947.57
Location Type /wp-admin/edit-tags.php?taxonomy=location-type&post_type=location3.9540.61
Business Places /wp-admin/options-general.php?page=tsoh3.9642.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 68 new files
Database: 1 new table, 9 new options
New tables
wp_ts_open_hour
New WordPress options
widget_tsoh-site-open-hour
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_tsoh-site-location
tsoh_db_version
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8213.32 ▼0.911.71 ▼0.0437.84 ▼3.34
Dashboard /wp-admin2,244 ▲645.82 ▲0.1995.27 ▲0.0237.89 ▼2.83
Posts /wp-admin/edit.php2,154 ▲512.30 ▲0.2839.45 ▼0.3937.97 ▲2.74
Add New Post /wp-admin/post-new.php1,569 ▲1423.60 ▲5.55742.76 ▲32.7258.12 ▼5.69
Media Library /wp-admin/upload.php1,449 ▲524.49 ▲0.2699.60 ▼6.6544.87 ▼5.86
Add New /wp-admin/post-new.php?post_type=location2,7798.08193.9081.96
Locations /wp-admin/edit.php?post_type=location1,1262.2632.1831.37
Location Type /wp-admin/edit-tags.php?taxonomy=location-type&post_type=location1,3282.1129.4334.47
Business Places /wp-admin/options-general.php?page=tsoh1,0651.8725.9532.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_ts_open_hour
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • widget_recent-comments
    • widget_tsoh-site-open-hour
    • tsoh_db_version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_tsoh-site-location
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 items
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/Pattern/AbstractWidget.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\Singleton' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/Formatter.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\AbstractMetaBox' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/MetaBoxes/OpenHourMetaBox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/taro-open-hour/templates/time-table.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Places' not found in wp-content/plugins/taro-open-hour/templates/setting.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\AbstractWidget' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/Widgets/SiteOpenHour.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/taro-open-hour/includes/shortcodes.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\AbstractMetaBox' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/MetaBoxes/LocationMetaBox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\AbstractRest' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/Rest/PlaceApi.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Tarosky\\OpenHour\\Pattern\\Singleton' not found in wp-content/plugins/taro-open-hour/app/Tarosky/OpenHour/Model.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: widget, business, place, open-hour

taro-open-hour/taro-open-hour.php Passed 13 tests

The primary PHP file in "" version 2.2.1 is used by WordPress to initiate all plugin functionality
41 characters long description:
Add place and open hour to any post type.

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
Everything looks great! No dangerous files found in this plugin18,227 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JSON20014,976
PHP354281,1122,544
JavaScript103055322
PO File1110150244
Sass5190138
CSS3223

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.14
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces8
Interfaces0
Traits1
Classes20
▷ Abstract classes420.00%
▷ Concrete classes1680.00%
▷ Final classes00.00%
Methods143
▷ Static methods2114.69%
▷ Public methods9868.53%
▷ Protected methods4128.67%
▷ Private methods42.80%
Functions34
▷ Named functions1955.88%
▷ Anonymous functions1544.12%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected