94% yummy-cookies

Code Review | Yummy Cookies

WordPress plugin Yummy Cookies scored 94% from 54 tests.

About plugin

  • Plugin page: yummy-cookies
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.6.2
  • WordPress version: 5.8.1
  • First release: Mar 3, 2021
  • Latest release: Mar 3, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: chrisjayden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 177 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼143.77ms] Passed 4 tests

Server-side resources used by Yummy Cookies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1350.05 ▲27.56
Dashboard /wp-admin3.07 ▲0.0149.72 ▲4.26
Posts /wp-admin/edit.php3.12 ▲0.0148.56 ▼0.96
Add New Post /wp-admin/post-new.php5.43 ▼0.0192.66 ▼570.84
Media Library /wp-admin/upload.php3.01 ▲0.0126.42 ▼7.52

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yummy Cookies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,720 ▲12416.21 ▲0.898.65 ▼1.0146.50 ▼6.44
Dashboard /wp-admin3,011 ▲775.93 ▼0.07167.42 ▲12.68129.32 ▲20.92
Posts /wp-admin/edit.php2,773 ▲342.86 ▲0.1471.52 ▼12.1692.43 ▲5.42
Add New Post /wp-admin/post-new.php1,520 ▼16318.49 ▼0.17397.81 ▼5.16107.87 ▲0.85
Media Library /wp-admin/upload.php1,842 ▲325.03 ▼0.00149.48 ▼6.68121.49 ▲0.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Core\\DynamicTags\\Tag' not found in wp-content/plugins/yummy-cookies/public/class-yummy-cookies-elementor-cookie-value.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Core\\DynamicTags\\Tag' not found in wp-content/plugins/yummy-cookies/public/class-yummy-cookies-elementor-cookie-name.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === yummy-cookies === )
You can look at the official readme.txt

yummy-cookies/yummy-cookies.php 92% from 13 tests

"Yummy Cookies" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Git Repository: A Git repository was detected inside this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected491 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11118541283
XML114992
JSON30089
YAML10027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.38
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2480.00%
▷ Protected methods26.67%
▷ Private methods413.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin