83% wp30-sky-bar

Code Review | WP30 Sky Bar

WordPress plugin WP30 Sky Bar scored83%from 54 tests.

About plugin

  • Plugin page: wp30-sky-bar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 16, 2017
  • Latest release: Dec 16, 2017
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: terrytsang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /521 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.25MB] [CPU: ▼7.55ms] Passed 4 tests

Analyzing server-side resources used by WP30 Sky Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2644.43 ▲1.14
Dashboard /wp-admin3.56 ▲0.2151.28 ▼13.88
Posts /wp-admin/edit.php3.67 ▲0.3255.44 ▲0.67
Add New Post /wp-admin/post-new.php6.17 ▲0.2889.48 ▼17.67
Media Library /wp-admin/upload.php3.48 ▲0.2541.03 ▲0.69
All Sky Bars /wp-admin/edit.php?post_type=wp30_sky_bar3.5239.00
Add New /wp-admin/post-new.php?post_type=wp30_sky_bar3.5245.12

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP30 Sky Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.28 ▲0.001.67 ▲0.1044.23 ▼1.12
Dashboard /wp-admin2,226 ▲525.61 ▼0.0596.48 ▲8.3142.59 ▲3.55
Posts /wp-admin/edit.php2,134 ▲342.00 ▲0.0541.09 ▲0.3636.85 ▼0.01
Add New Post /wp-admin/post-new.php6,308 ▲4,78326.14 ▲3.22962.15 ▲311.6443.32 ▼12.18
Media Library /wp-admin/upload.php1,428 ▲284.22 ▲0.00103.98 ▲1.1044.97 ▼0.09
All Sky Bars /wp-admin/edit.php?post_type=wp30_sky_bar1,0921.9533.8731.73
Add New /wp-admin/post-new.php?post_type=wp30_sky_bar2,3513.0288.6843.20

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp30-sky-bar/public/partials/wp30-sky-bar-public-display.php
    • > /wp-content/plugins/wp30-sky-bar/admin/partials/wp30-sky-bar-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Website with top "Sky Bar" bar), #2 (Side menu with "Sky Bar" > All Sky Bars"), #3 (General Settings at Sky Bar), #4 (Content options at Sky Bar), #5 (Design options at Sky Bar), #6 (Rules options at Sky Bar)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp30-sky-bar === )
You can take inspiration from this readme.txt

wp30-sky-bar/wp30-sky-bar.php Passed 13 tests

The main PHP script in "WP30 Sky Bar" version 1.0.0 is automatically included on every request by WordPress
34 characters long description:
A top bar for your message channel

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,520 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP143507701,164
CSS4132198
JavaScript34725158

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity28.22
▷ Minimum class complexity1.00
▷ Maximum class complexity146.00
Average method complexity5.80
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods4486.27%
▷ Protected methods00.00%
▷ Private methods713.73%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
20 PNG files occupy 1.88MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/social/dribbble.png0.59KB0.92KB0.00%
public/images/social/behance.png0.78KB0.99KB0.00%
public/images/social/linkedin.png0.43KB0.60KB0.00%
screenshot-2.png56.96KB18.48KB▼ 67.55%
screenshot-1.png1,527.86KB636.25KB▼ 58.36%