10% ocws-admin-bar-greeting

Code Review | OCWS Admin Bar Greeting

WordPress plugin OCWS Admin Bar Greeting scored10%from 54 tests.

About plugin

  • Plugin page: ocws-admin-bar-gr...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Sep 17, 2012
  • Latest release: Jul 28, 2016
  • Number of updates: 12
  • Update frequency: every 117.6 days
  • Top authors: pftaylor61 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,404 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/ocws-admin-bar-greeting/class/OCWS_welcome_message.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; OCWS_welcome_message has a deprecated constructor

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

An overview of server-side resources used by OCWS Admin Bar Greeting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.15 ▼2.45
Dashboard /wp-admin3.31 ▼0.0352.68 ▼18.27
Posts /wp-admin/edit.php3.37 ▲0.0150.20 ▲0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.36 ▼12.20
Media Library /wp-admin/upload.php3.24 ▲0.0137.85 ▼1.24
OCWS Admin Greeting /wp-admin/options-general.php?page=admin-bar-welcome3.2034.98

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for OCWS Admin Bar Greeting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.38 ▲0.101.76 ▼0.2442.77 ▼1.91
Dashboard /wp-admin2,202 ▲255.57 ▼0.0983.44 ▼4.7338.71 ▼0.28
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0136.24 ▼0.5834.08 ▼0.04
Add New Post /wp-admin/post-new.php1,531 ▲623.33 ▼0.20674.27 ▲82.2563.78 ▲16.97
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0699.07 ▼3.7745.59 ▲5.13
OCWS Admin Greeting /wp-admin/options-general.php?page=admin-bar-welcome8152.0326.5530.95

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ocws-admin-bar-greeting/class/OCWS_welcome_message.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (The Options Page for the Plugin, showing how you can set your personal greeting.), #2 (A close-up of the greeting produced.)
  • Plugin Name: You should set the name of your plugin on the first line ( === ocws-admin-bar-greeting === )
Please take inspiration from this readme.txt

ocws-admin-bar-greeting/OCWS_welcome_message.php 85% from 13 tests

"OCWS Admin Bar Greeting" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 392 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ocws-admin-bar-greeting.php" instead of "OCWS_welcome_message.php")

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
There were no executable files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2404490

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/castlelogomain.png8.34KB4.66KB▼ 44.09%
screenshot-2.png16.35KB6.26KB▼ 61.73%
images/castlelogo32x39.png1.40KB1.89KB0.00%
images/castlelogo16x16.png0.64KB0.97KB0.00%
screenshot-1.png33.08KB11.78KB▼ 64.38%