10% jokerz-joke-of-the-day

Code Review | Jokerz Joke of the Day

WordPress plugin Jokerz Joke of the Day scored 10% from 53 tests.

About plugin

  • Plugin page: jokerz-joke-of-th...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jul 1, 2014
  • Latest release: Jul 1, 2014
  • Number of updates: 41
  • Update frequency: every 0.0 days
  • Top authors: jokerzmediallc (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

20+ active / 1,059 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/jokerz-joke-of-the-day/jokerz.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; TodayJoke has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼320.23ms] Passed 4 tests

Analyzing server-side resources used by Jokerz Joke of the Day
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.895.14 ▼17.70
Dashboard /wp-admin1.84 ▼1.215.85 ▼33.71
Posts /wp-admin/edit.php1.85 ▼1.266.90 ▼36.02
Add New Post /wp-admin/post-new.php1.84 ▼3.586.02 ▼1,178.07
Media Library /wp-admin/upload.php1.85 ▼1.164.81 ▼33.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_todayjokewidget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jokerz Joke of the Day
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲21716.52 ▲0.9512.36 ▲2.7147.15 ▼0.04
Dashboard /wp-admin2,950 ▲976.00 ▲0.16138.41 ▲3.74104.99 ▼2.73
Posts /wp-admin/edit.php2,703 ▼32.70 ▲0.0162.81 ▼1.9290.94 ▼3.32
Add New Post /wp-admin/post-new.php1,477 ▼38018.50 ▼0.67341.42 ▼16.84101.15 ▼5.95
Media Library /wp-admin/upload.php1,766 ▼65.00 ▼0.01143.49 ▲4.91106.94 ▼10.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/jokerz-joke-of-the-day/jokerz.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; TodayJoke has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_todayjokewidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jokerz-joke-of-the-day/jokerz.php:20

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 87% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in jokerz-joke-of-the-day/assets to your readme.txt
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

jokerz-joke-of-the-day/jokerz.php 85% from 13 tests

The main PHP file in "Jokerz Joke of the Day" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 452 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jokerz-joke-of-the-day.php" instead of "jokerz.php")

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
Everything looks great! No dangerous files found in this plugin247 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14010241
JavaScript1106

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png40.89KB18.27KB▼ 55.32%
screenshot-1.png34.75KB21.06KB▼ 39.39%
screenshot-2.png60.67KB26.22KB▼ 56.79%