62% stratus

Code Review | Stratus

WordPress plugin Stratus scored62%from 54 tests.

About plugin

  • Plugin page: stratus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2012
  • Latest release: Mar 23, 2012
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: leemartin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /10,565 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.34ms] Passed 4 tests

Server-side resources used by Stratus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.99 ▼36.51
Dashboard /wp-admin2.09 ▼1.225.53 ▼42.12
Posts /wp-admin/edit.php2.09 ▼1.277.16 ▼40.97
Add New Post /wp-admin/post-new.php2.09 ▼3.806.20 ▼97.74
Media Library /wp-admin/upload.php2.09 ▼1.146.17 ▼30.48
Stratus Settings /wp-admin/options-general.php?page=stratus2.096.97

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Stratus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.71 ▼0.976.71 ▲4.9137.34 ▼2.22
Dashboard /wp-admin2,214 ▲235.01 ▼0.7998.39 ▼4.4038.04 ▼7.46
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0634.00 ▼1.1830.37 ▼9.55
Add New Post /wp-admin/post-new.php1,535 ▲2123.35 ▲5.81658.84 ▼61.4254.68 ▼0.76
Media Library /wp-admin/upload.php1,399 ▲84.18 ▲0.0492.13 ▼7.0642.58 ▼0.25
Stratus Settings /wp-admin/options-general.php?page=stratus8482.0223.4326.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stratus handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=stratus
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the stratus handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stratus
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stratus/wp-stratus.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=stratus
    • > Network (severe)
    https://stratus.soundcloud.com/stratus.js?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=stratus
    • > Network (severe)
    https://stratus.soundcloud.com/images/logo.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (M83 - [ilovem83.com](http://ilovem83.com)), #2 (The Vaccines - [thevaccines.co.uk](http://thevaccines.co.uk)), #3 (Rokysopp - [rokysopp.com](http://rokysopp.com)), #4 (School of Seven Bells - [sviib.com](http://sviib.com))
The official readme.txt is a good inspiration

stratus/wp-stratus.php 85% from 13 tests

The main file in "Stratus" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stratus.php" instead of "wp-stratus.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 204 characters long)

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
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1342563

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 1.15MB with 0.70MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png314.18KB125.09KB▼ 60.19%
screenshot-3.png284.52KB135.39KB▼ 52.41%
screenshot-4.png255.07KB94.86KB▼ 62.81%
screenshot-2.png327.44KB109.55KB▼ 66.54%