78% show-me-the-cookies

Code Review | Show Me The Cookies

WordPress plugin Show Me The Cookies scored78%from 54 tests.

About plugin

  • Plugin page: show-me-the-cookies
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2019
  • Latest release: Nov 4, 2022
  • Number of updates: 12
  • Update frequency: every 110.3 days
  • Top authors: versluis (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active /4,130 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼8.18ms] Passed 4 tests

An overview of server-side resources used by Show Me The Cookies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.15 ▼5.90
Dashboard /wp-admin3.32 ▼0.0251.31 ▼10.84
Posts /wp-admin/edit.php3.37 ▲0.0253.34 ▲0.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.53 ▼15.69
Media Library /wp-admin/upload.php3.24 ▲0.0238.21 ▼0.27
Cookies /wp-admin/themes.php?page=gcookies3.3336.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Show Me The Cookies
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.392.14 ▼0.1748.68 ▲4.99
Dashboard /wp-admin2,210 ▲194.81 ▼1.09103.13 ▼2.2537.04 ▼5.93
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0141.55 ▼0.8435.18 ▼1.34
Add New Post /wp-admin/post-new.php1,517 ▲317.61 ▲0.03690.67 ▲21.7565.78 ▼2.10
Media Library /wp-admin/upload.php1,389 ▲14.14 ▼0.05110.10 ▼8.9548.66 ▲1.72
Cookies /wp-admin/themes.php?page=gcookies1,1707.79268.4968.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=gcookies
    • > Notice in wp-content/plugins/show-me-the-cookies/cookies.php+192
    Undefined variable: content
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=gcookies
    • > Notice in wp-content/plugins/show-me-the-cookies/cookies.php+204
    Undefined variable: novalue

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-me-the-cookies/cookies.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #2 is missing in show-me-the-cookies/assets to your readme.txt
  • Donate link: Invalid URI found ("https//ko-fi.com/wpguru")
You can take inspiration from this readme.txt

show-me-the-cookies/cookies.php 92% from 13 tests

The main PHP file in "Show Me The Cookies" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("show-me-the-cookies.php" instead of "cookies.php")

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
No dangerous file extensions were detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13549128

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/guru-header-2013.png33.72KB13.19KB▼ 60.90%