74% vertical-center

Code Review | Vertical Center

WordPress plugin Vertical Center scored74%from 54 tests.

About plugin

  • Plugin page: vertical-center
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2015
  • Latest release: Dec 7, 2015
  • Number of updates: 20
  • Update frequency: every 12.6 days
  • Top authors: Braad (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /4,090 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.88MB] [CPU: ▼32.06ms] Passed 4 tests

A check of server-side resources used by Vertical Center
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.38 ▲2.77
Dashboard /wp-admin3.06 ▼0.2424.10 ▼24.35
Posts /wp-admin/edit.php3.06 ▼0.2928.35 ▼17.61
Add New Post /wp-admin/post-new.php3.06 ▼2.8224.54 ▼73.40
Media Library /wp-admin/upload.php3.06 ▼0.1724.07 ▼12.89
Vertical Center /wp-admin/options-general.php?page=vertical-center3.0624.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Vertical Center
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.96 ▼0.628.93 ▲7.2144.58 ▲2.51
Dashboard /wp-admin2,213 ▲224.84 ▼0.0398.29 ▼4.0139.64 ▼2.87
Posts /wp-admin/edit.php2,090 ▼22.04 ▲0.0533.77 ▼4.2432.52 ▲1.45
Add New Post /wp-admin/post-new.php1,522 ▼1123.22 ▲0.01648.74 ▼36.4159.45 ▲5.13
Media Library /wp-admin/upload.php1,395 ▲44.23 ▲0.0397.16 ▼2.5144.77 ▼0.38
Vertical Center /wp-admin/options-general.php?page=vertical-center8522.0830.0230.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/vertical-center/classes/class-vertical-center.php+204
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=vertical-center
    • > Notice in wp-content/plugins/vertical-center/classes/class-vertical-center.php+204
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=vertical-center
    • > Warning in wp-content/plugins/vertical-center/classes/class-vertical-center.php+204
    count(): Parameter must be an array or an object that implements Countable

SRP Passed 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
The SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: jquery, responsive, vertical, javascript, center

vertical-center/vertical-center.php Passed 13 tests

"Vertical Center" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
81 characters long description:
Easily vertically center any element relative to its container. Fully responsive.

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
Everything looks great! No dangerous files found in this plugin517 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript37688190
PHP250132180
Markdown1670109
JSON10020
CSS16518

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
PNG images were not found in this plugin