79% tinycoffee

Code Review | tinyCoffee

WordPress plugin tinyCoffee scored 79% from 54 tests.

About plugin

  • Plugin page: tinycoffee
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Jan 19, 2014
  • Latest release: Feb 22, 2018
  • Number of updates: 27
  • Update frequency: every 55.4 days
  • Top authors: ideag (59.26%)deployer (44.44%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active / 8,649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼2.03ms] Passed 4 tests

Server-side resources used by tinyCoffee
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2740.85 ▼4.57
Dashboard /wp-admin3.58 ▲0.2753.84 ▲0.99
Posts /wp-admin/edit.php3.69 ▲0.3347.66 ▼0.49
Add New Post /wp-admin/post-new.php6.16 ▲0.2788.38 ▼4.06
Media Library /wp-admin/upload.php3.50 ▲0.2738.28 ▲2.90
tinyCoffee /wp-admin/options-general.php?page=tiny_coffee_options3.4737.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
tiny_coffee_options
widget_coffee_widget
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for tinyCoffee
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲27313.76 ▼0.6211.03 ▲9.3036.71 ▼16.16
Dashboard /wp-admin2,213 ▲285.82 ▼0.03106.81 ▼11.1440.01 ▼6.19
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0037.54 ▼0.3230.93 ▼1.45
Add New Post /wp-admin/post-new.php1,549 ▲1618.29 ▼5.15642.40 ▲23.9980.42 ▲9.37
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.01101.72 ▼4.5743.56 ▼1.61
tinyCoffee /wp-admin/options-general.php?page=tiny_coffee_options4,6802.0324.6532.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • tiny_coffee_options
    • widget_coffee_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tinycoffee/tinycoffee.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tinycoffee/includes/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: donate widget, coffee, donate button, donate shortcode, donate...

tinycoffee/tinycoffee.php Passed 13 tests

"tinyCoffee" version 0.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
27 characters long description:
Ask people for coffee money

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,146 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP497153621
CSS3270228
PO File27784187
JavaScript30175
Markdown117035

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.75
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1542.86%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.64KB12.73KB▼ 55.55%
screenshot-2.png4.90KB3.24KB▼ 33.96%
screenshot-3.png28.53KB12.82KB▼ 55.07%