84% strangebutfunnys-random-funny-picture

Code Review | StrangeButFunnys Random Funny Picture

WordPress plugin StrangeButFunnys Random Funny Picture scored84%from 54 tests.

About plugin

  • Plugin page: strangebutfunnys-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 3, 2013
  • Latest release: May 3, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: Adzbierajewski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /802 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.15ms] Passed 4 tests

Analyzing server-side resources used by StrangeButFunnys Random Funny Picture
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.51 ▼1.98
Dashboard /wp-admin3.31 ▼0.0344.20 ▼14.84
Posts /wp-admin/edit.php3.36 ▲0.0141.97 ▼1.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.48 ▼18.10
Media Library /wp-admin/upload.php3.23 ▲0.0035.11 ▲1.04

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by StrangeButFunnys Random Funny Picture
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2914.25 ▼0.311.67 ▲0.2437.95 ▼1.89
Dashboard /wp-admin2,196 ▲165.54 ▼0.1286.56 ▼4.6136.09 ▼3.00
Posts /wp-admin/edit.php2,101 ▲42.03 ▲0.0434.17 ▼0.9834.91 ▼0.64
Add New Post /wp-admin/post-new.php1,680 ▲15422.17 ▼0.98635.92 ▲5.0749.71 ▼9.53
Media Library /wp-admin/upload.php1,395 ▼84.19 ▼0.0195.38 ▼20.2141.95 ▼8.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/strangebutfunnys-random-funny-picture/strangebutfunny-random-funny-picture.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Here's a screenshot of it in action) image required
The official readme.txt is a good inspiration

strangebutfunnys-random-funny-picture/strangebutfunny-random-funny-picture.php 92% from 13 tests

This is the main PHP file of "StrangeButFunnys Random Funny Picture" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("strangebutfunnys-random-funny-picture.php" instead of "strangebutfunny-random-funny-picture.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP101020

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.14
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%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.35MB with 0.21MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png358.82KB146.94KB▼ 59.05%