74% bdihot

Code Review | Random Joke (Bdihot.co.il)

WordPress plugin Random Joke (Bdihot.co.il) scored74%from 54 tests.

About plugin

  • Plugin page: bdihot
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: May 18, 2012
  • Latest release: Mar 2, 2015
  • Number of updates: 16
  • Update frequency: every 63.6 days
  • Top authors: ramiy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,733 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.69MB] [CPU: ▼49.43ms] Passed 4 tests

An overview of server-side resources used by Random Joke (Bdihot.co.il)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.1610.43 ▼30.46
Dashboard /wp-admin2.32 ▼0.9811.94 ▼41.50
Posts /wp-admin/edit.php2.32 ▼1.0412.93 ▼38.50
Add New Post /wp-admin/post-new.php2.32 ▼3.5711.64 ▼87.27
Media Library /wp-admin/upload.php2.32 ▼0.9111.05 ▼25.98

Server storage [IO: ▲0.40MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_bdihot_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Random Joke (Bdihot.co.il): an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9214.26 ▼0.101.90 ▲0.0141.92 ▼4.37
Dashboard /wp-admin2,231 ▲635.60 ▼0.0191.69 ▲1.0943.08 ▼3.35
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0538.86 ▼7.8235.38 ▼4.09
Add New Post /wp-admin/post-new.php1,526 ▼223.02 ▼0.12669.67 ▲4.2856.60 ▲2.87
Media Library /wp-admin/upload.php1,400 ▲34.12 ▼0.06101.02 ▼10.9245.43 ▼5.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/bdihot/bdihot.php+123
    Use of undefined constant bdihot - assumed 'bdihot' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_bdihot_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/bdihot/bdihot.php:15

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: bdihot, humor, sidebar, jokes, rtl...

bdihot/bdihot.php Passed 13 tests

The principal PHP file in "Random Joke (Bdihot.co.il)" v. 0.4 is loaded by WordPress automatically on each request
124 characters long description:
This plugin allows you to add a random joke (from bdihot.co.il) using wordpress Sidebar-Widget and Dashboard-Widget systems.

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
Everything looks great! No dangerous files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13838118
PO File181227

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
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
3 PNG files occupy 0.39MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png378.99KB134.81KB▼ 64.43%
screenshot-2.png8.30KB3.73KB▼ 55.05%
screenshot-1.png11.27KB4.95KB▼ 56.11%