84% sebastian

Code Review | Sebastian

WordPress plugin Sebastian scored84%from 54 tests.

About plugin

  • Plugin page: sebastian
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Dec 23, 2020
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: batuhankok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.16ms] Passed 4 tests

An overview of server-side resources used by Sebastian
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.23 ▲2.53
Dashboard /wp-admin3.42 ▲0.1151.87 ▼6.46
Posts /wp-admin/edit.php3.53 ▲0.1754.20 ▼0.48
Add New Post /wp-admin/post-new.php6.00 ▲0.1195.01 ▼4.23
Media Library /wp-admin/upload.php3.34 ▲0.1141.53 ▲3.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
sebastian_settings
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Sebastian
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲21713.74 ▼0.847.17 ▲5.2243.48 ▼1.04
Dashboard /wp-admin2,274 ▲745.11 ▲0.23113.30 ▼4.6539.44 ▼8.99
Posts /wp-admin/edit.php2,155 ▲552.30 ▲0.1341.57 ▲1.1934.15 ▼1.58
Add New Post /wp-admin/post-new.php1,552 ▲723.30 ▲0.22628.32 ▼6.5334.19 ▼19.93
Media Library /wp-admin/upload.php1,447 ▲474.35 ▲0.14102.87 ▼22.5346.07 ▼8.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • sebastian_settings
    • widget_theysaidso_widget

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 | 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sebastian/public/partials/sebastian-public-display.php
    • > /wp-content/plugins/sebastian/admin/partials/sebastian-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: dot, sebastian, batuhan, fun, joking...

sebastian/sebastian.php Passed 13 tests

The principal PHP file in "Sebastian" v. 1.0.0 is loaded by WordPress automatically on each request
99 characters long description:
Sebastian is a simple Wordpress plugin that allows you to surprise your visitors. Like easter eggs.

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
No dangerous file extensions were detected929 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1392104456
CSS24510267
PO File26058132
JavaScript28074

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.88
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo.png72.38KB30.88KB▼ 57.34%
admin/images/radixworks.png15.56KB4.15KB▼ 73.32%