84% funny-placeholder

Code Review | Funny placeholder

WordPress plugin Funny placeholder scored84%from 54 tests.

About plugin

  • Plugin page: funny-placeholder
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 17, 2014
  • Latest release: May 22, 2015
  • Number of updates: 15
  • Update frequency: every 27.2 days
  • Top authors: melangercz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /982 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Funny placeholder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0153.77 ▲15.87
Dashboard /wp-admin3.31 ▼0.0343.67 ▼13.67
Posts /wp-admin/edit.php3.36 ▲0.0148.81 ▲2.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.10 ▼11.30
Media Library /wp-admin/upload.php3.24 ▲0.0130.67 ▼0.96

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_funny_placeholder

Browser metrics Passed 4 tests

An overview of browser requirements for Funny placeholder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.102.08 ▲0.3843.43 ▲2.36
Dashboard /wp-admin2,206 ▲175.86 ▼0.00109.84 ▲4.8545.15 ▼0.07
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0039.38 ▼2.5035.55 ▼0.35
Add New Post /wp-admin/post-new.php1,545 ▲1018.23 ▼4.90594.71 ▼26.6352.62 ▼1.80
Media Library /wp-admin/upload.php1,391 ▲94.27 ▲0.12101.78 ▲3.2345.29 ▲0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_funny_placeholder

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix 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/funny-placeholder/funny-placeholder.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: adverisments, ads, placeholder, jokes, funny

funny-placeholder/funny-placeholder.php Passed 13 tests

The main PHP script in "Funny placeholder" version 1.1 is automatically included on every request by WordPress
78 characters long description:
If you do not have advertisements to show on your website, try some funny ads!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142397
PO File15527

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
48 PNG files occupy 3.27MB with 1.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/02/cz/007.png38.55KB15.68KB▼ 59.32%
img/03/cz/008.png36.80KB14.28KB▼ 61.20%
img/01/cz/005.png167.71KB60.83KB▼ 63.73%
img/03/cz/007.png30.39KB13.08KB▼ 56.96%
img/01/cz/001.png86.66KB33.15KB▼ 61.74%