72% coffee-admin-theme

Code Review | Coffee Admin Theme

WordPress plugin Coffee Admin Theme scored72%from 54 tests.

About plugin

  • Plugin page: coffee-admin-theme
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.3.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2011
  • Latest release: Jun 18, 2012
  • Number of updates: 47
  • Update frequency: every 4.0 days
  • Top authors: brightonmike (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /10,573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.21MB] [CPU: ▼14.23ms] Passed 4 tests

A check of server-side resources used by Coffee Admin Theme
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.39 ▲0.58
Dashboard /wp-admin3.08 ▼0.2225.81 ▼25.59
Posts /wp-admin/edit.php3.22 ▼0.1331.01 ▼13.11
Add New Post /wp-admin/post-new.php5.46 ▼0.4276.08 ▼11.43
Media Library /wp-admin/upload.php3.17 ▼0.0627.80 ▼6.77
Coffee Theme Options /wp-admin/options-general.php?page=dashtheme_themeoptions3.0726.15

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Coffee Admin Theme
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7714.84 ▲0.071.64 ▼0.4444.14 ▼1.79
Dashboard /wp-admin2,221 ▲364.87 ▼1.00107.29 ▲3.4544.26 ▲7.42
Posts /wp-admin/edit.php2,101 ▲121.99 ▼0.0538.09 ▲0.3433.25 ▲1.30
Add New Post /wp-admin/post-new.php1,525 ▼1217.76 ▼5.32594.56 ▼1.4457.54 ▲3.82
Media Library /wp-admin/upload.php1,403 ▲124.17 ▼0.0493.41 ▼6.4042.54 ▼2.09
Coffee Theme Options /wp-admin/options-general.php?page=dashtheme_themeoptions9262.0324.9525.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dashtheme_themeoptions
    • > Notice in wp-content/plugins/coffee-admin-theme/index.php+100
    Trying to access array offset on value of type bool
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dashtheme_themeoptions
    • > Notice in wp-content/plugins/coffee-admin-theme/index.php+40
    Undefined offset: 1

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coffee-admin-theme/index.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=dashtheme_themeoptions
    • > Network (severe)
    wp-content/plugins/coffee-admin-theme/.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dashtheme_themeoptions
    • > Network (severe)
    http://fonts.googleapis.com/css?family&ver=1.0.0 - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot of the original "Coffee" theme.), #2 (Screenshot of the "Piano" theme, showing custom fonts and the custom icons, which will be released soon.)
You can take inspiration from this readme.txt

coffee-admin-theme/index.php 92% from 13 tests

Analyzing the main PHP file in "Coffee Admin Theme" version 1.4.1
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("coffee-admin-theme.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,207 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS5294261,115
PHP1221392

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pinstripe.png0.52KB0.59KB0.00%
images/diagonal-noise.png8.29KB5.32KB▼ 35.84%