10% oh-hey-world

Code Review | Oh Hey World

WordPress plugin Oh Hey World scored 10% from 54 tests.

About plugin

  • Plugin page: oh-hey-world
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4.2
  • WordPress version: 5.8.1
  • First release: Jan 31, 2013
  • Latest release: Apr 8, 2016
  • Number of updates: 19
  • Update frequency: every 61.6 days
  • Top authors: drewmeyers (42.11%)dustin999 (36.84%)amattie (31.58%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,173 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/oh-hey-world/widget-badge.php+101
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼186.34ms] Passed 4 tests

This is a short check of server-side resources used by Oh Hey World
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.915.69 ▼18.05
Dashboard /wp-admin1.83 ▼1.234.91 ▼39.86
Posts /wp-admin/edit.php1.83 ▼1.286.41 ▼36.55
Add New Post /wp-admin/post-new.php1.83 ▼3.615.00 ▼642.62
Media Library /wp-admin/upload.php1.83 ▼1.185.07 ▼26.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
widget_ohw_profile

Browser metrics Passed 4 tests

This is an overview of browser requirements for Oh Hey World
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11315.87 ▲0.2110.07 ▼0.9746.28 ▼3.00
Dashboard /wp-admin2,969 ▲386.06 ▲0.00137.98 ▼0.88112.87 ▼5.49
Posts /wp-admin/edit.php2,741 ▲22.72 ▼0.1264.91 ▼5.5789.53 ▼2.80
Add New Post /wp-admin/post-new.php1,674 ▲17618.88 ▲0.06381.77 ▲0.84116.68 ▲3.88
Media Library /wp-admin/upload.php1,812 ▲25.02 ▼0.05154.78 ▲18.83124.76 ▲4.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/oh-hey-world/widget-badge.php+101
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ohw_profile

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)
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/oh-hey-world/shortcodes.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/oh-hey-world/shortcodes.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/oh-hey-world/widget-badge.php:3

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === oh-hey-world === )
You can look at the official readme.txt

oh-hey-world/bootstrap.php 92% from 13 tests

The entry point to "Oh Hey World" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("oh-hey-world.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin240 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51710163
CSS15277

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png8.90KB5.62KB▼ 36.86%
img/logo-horizon.png11.35KB7.37KB▼ 35.08%