71% easter-egg

Code Review | Easter Eggs

WordPress plugin Easter Eggs scored71%from 54 tests.

About plugin

  • Plugin page: easter-egg
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Aug 16, 2022
  • Latest release: Aug 16, 2022
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: scaryking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 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.19MB] [CPU: ▼1.74ms] Passed 4 tests

Analyzing server-side resources used by Easter Eggs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1738.67 ▼0.01
Dashboard /wp-admin3.56 ▲0.2152.29 ▼4.55
Posts /wp-admin/edit.php3.62 ▲0.2647.20 ▲0.42
Add New Post /wp-admin/post-new.php6.09 ▲0.2086.61 ▼2.79
Media Library /wp-admin/upload.php3.40 ▲0.1735.66 ▲0.39
Easter Egg /wp-admin/options-general.php?page=easter_egg3.3733.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Easter Eggs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲26315.21 ▲0.856.64 ▲5.0543.32 ▲2.92
Dashboard /wp-admin2,343 ▲1696.19 ▲0.52121.03 ▲36.5741.56 ▼0.56
Posts /wp-admin/edit.php2,274 ▲1743.40 ▲1.2643.56 ▲5.9030.43 ▼5.11
Add New Post /wp-admin/post-new.php6,270 ▲4,74226.01 ▲2.77912.75 ▲228.7136.87 ▼20.67
Media Library /wp-admin/upload.php1,402 ▲24.26 ▲0.0479.51 ▼38.3141.90 ▼7.19
Easter Egg /wp-admin/options-general.php?page=easter_egg1,1503.1638.5674.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=easter_egg
    • > Notice in wp-content/plugins/easter-egg/admin/class-easter-egg-scaryking-admin.php+231
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easter_egg
    • > Warning in wp-content/plugins/easter-egg/admin/class-easter-egg-scaryking-admin.php+318
    array_key_exists() expects parameter 2 to be array, bool given

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easter-egg/public/partials/easter-egg-scaryking-public-display.php
    • > /wp-content/plugins/easter-egg/admin/partials/easter-egg-scaryking-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easter-egg/includes/class-easter-egg-scaryking-metabox.php:9

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

Optimizations

Plugin configuration 83% from 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
10 plugin tags: easter eggs, gutschein, feature, marketing, post...

easter-egg/easter-egg-scaryking.php 62% from 13 tests

The main PHP file in "Easter Eggs" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 227 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("easter-egg.php" instead of "easter-egg-scaryking.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "5.1")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.6" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,324 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13207555719
JavaScript38983511
CSS3121594

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods3976.47%
▷ Protected methods00.00%
▷ Private methods1223.53%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/default.png14.51KB8.90KB▼ 38.71%