83% hipsum-pixel

Code Review | Hipsum Pixel

WordPress plugin Hipsum Pixel scored 83% from 54 tests.

About plugin

  • Plugin page: hipsum-pixel
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 17, 2016
  • Latest release: Oct 22, 2018
  • Number of updates: 14
  • Update frequency: every 50.2 days
  • Top authors: laith3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.09MB] [CPU: ▼10.55ms] Passed 4 tests

Server-side resources used by Hipsum Pixel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.56 ▼10.31
Dashboard /wp-admin3.32 ▲0.0243.05 ▼5.22
Posts /wp-admin/edit.php3.37 ▲0.0249.79 ▲3.96
Add New Post /wp-admin/post-new.php5.45 ▼0.4368.74 ▼28.75
Media Library /wp-admin/upload.php3.25 ▲0.0237.20 ▲2.08
Hipsum Pixel Options /wp-admin/tools.php?page=hipsum-pixel3.2430.30

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hipsum Pixel
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼1.301.84 ▼0.3341.52 ▼9.44
Dashboard /wp-admin2,213 ▲245.84 ▲0.93103.67 ▼22.5239.45 ▼6.12
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0439.71 ▲5.5035.15 ▼1.62
Add New Post /wp-admin/post-new.php1,956 ▲42323.00 ▲0.16654.23 ▼4.9466.57 ▲7.39
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0594.24 ▼10.0741.03 ▼4.35
Hipsum Pixel Options /wp-admin/tools.php?page=hipsum-pixel8362.0627.7729.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hipsum-pixel/admin/partials/hipsum-pixel-modal.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/hipsum-pixel/admin/partials/hipsum-pixel-section-info.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === hipsum-pixel === )
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in hipsum-pixel/assets to your readme.txt
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

hipsum-pixel/hipsum-pixel.php 92% from 13 tests

The principal PHP file in "Hipsum Pixel" v. 2.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 238 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected664 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11131451389
JavaScript12619182
CSS4111693

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2385.19%
▷ Protected methods00.00%
▷ Private methods414.81%
Functions3
▷ Named functions3100.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
9 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
admin/img/screenshot-1.png30.62KB6.18KB▼ 79.81%
lib/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
lib/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
admin/img/icon-dark.png2.55KB1.93KB▼ 24.29%