84% rim-diary

Code Review | Tim Hortons Rim Diary

WordPress plugin Tim Hortons Rim Diary scored84%from 54 tests.

About plugin

  • Plugin page: rim-diary
  • Plugin version: 1.0.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 4, 2014
  • Latest release: Feb 7, 2018
  • Number of updates: 12
  • Update frequency: every 119.7 days
  • Top authors: jweathe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Tim Hortons Rim Diary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.24 ▲0.83
Dashboard /wp-admin3.35 ▲0.0548.76 ▲1.64
Posts /wp-admin/edit.php3.46 ▲0.1145.82 ▼1.61
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.83 ▼7.14
Media Library /wp-admin/upload.php3.27 ▲0.0534.37 ▼4.50

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_rim-diary

Browser metrics Passed 4 tests

Checking browser requirements for Tim Hortons Rim Diary
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.80 ▲0.421.78 ▲0.0446.85 ▲1.60
Dashboard /wp-admin2,222 ▲345.86 ▲0.0596.45 ▼19.8237.44 ▼5.61
Posts /wp-admin/edit.php2,108 ▲221.99 ▼0.0634.63 ▼1.5030.13 ▼6.07
Add New Post /wp-admin/post-new.php1,551 ▲1823.43 ▲0.10672.99 ▲4.6849.72 ▼8.97
Media Library /wp-admin/upload.php1,407 ▲224.28 ▲0.0895.49 ▼10.2543.71 ▼3.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_rim-diary

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rim-diary/views/admin/rimdiaryadminview.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rim-diary/core-plugin.php:82
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/rim-diary/views/widgetview.php on line 1
    • > PHP Notice
      Undefined variable: winnings in wp-content/plugins/rim-diary/views/admin/rimdiaryadminview.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/rim-diary/views/admin/rimdiaryadminview.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rim-diary/plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rim-diary/admin-plugin.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rim-diary/views/widgetview.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: coffee, tim hortons, roll up the rim to win

rim-diary/plugin.php 92% from 13 tests

The main PHP file in "Tim Hortons Rim Diary" ver. 1.0.18 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rim-diary.php" instead of "plugin.php")

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
No dangerous file extensions were detected281 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55028172
PO File1145955
CSS111054

PHP code Passed 2 tests

A brief analysis 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.29
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1578.95%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/prize-donut.png16.41KB16.45KB0.00%
resources/images/prize-coffee.png16.41KB16.45KB0.00%
resources/images/prize-television.png17.11KB17.19KB0.00%
resources/images/roll-up-the-rim-cup.png31.75KB30.81KB▼ 2.96%
resources/images/prize-prepaid-card.png19.51KB19.24KB▼ 1.38%