84% coffee-cup-widget

Code Review | Coffee cup widget

WordPress plugin Coffee cup widget scored84%from 54 tests.

About plugin

  • Plugin page: coffee-cup-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 1, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 50
  • Update frequency: every 0.1 days
  • Top authors: coffeetravelr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /646 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.13ms] Passed 4 tests

A check of server-side resources used by Coffee cup widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.89 ▲0.67
Dashboard /wp-admin3.33 ▲0.0344.77 ▼3.90
Posts /wp-admin/edit.php3.38 ▲0.0347.85 ▲2.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.80 ▲2.95
Media Library /wp-admin/upload.php3.25 ▲0.0334.74 ▲0.78

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Coffee cup widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16214.00 ▼0.2111.96 ▲10.1340.78 ▼4.41
Dashboard /wp-admin2,206 ▲186.02 ▲0.1499.36 ▼11.3541.46 ▼1.60
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0239.21 ▲1.7435.08 ▲0.81
Add New Post /wp-admin/post-new.php1,535 ▲1623.20 ▲0.05596.99 ▼59.4844.93 ▼8.92
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0996.54 ▼6.6842.91 ▼0.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_coffeecup
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/coffee-cup-widget/coffee-cup-widget.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration Passed 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
4 plugin tags: coffee, ratio, widget, cup

coffee-cup-widget/coffee-cup-widget.php Passed 13 tests

The main PHP script in "Coffee cup widget" version 1.0.1 is automatically included on every request by WordPress
62 characters long description:
This plugin adds a coffee cup widget to: Appearance > Widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,025 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin