10% greenweb

Code Review | Sitestream

WordPress plugin Sitestream scored10%from 54 tests.

About plugin

  • Plugin page: greenweb
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: May 27, 2022
  • Latest release: Oct 27, 2022
  • Number of updates: 21
  • Update frequency: every 7.8 days
  • Top authors: seenthis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,178 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/greenweb/sitestream.php+162
    Trying to get property 'prefix' of non-object

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.10ms] Passed 4 tests

This is a short check of server-side resources used by Sitestream
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.26 ▲0.08
Dashboard /wp-admin3.39 ▲0.0449.62 ▼18.56
Posts /wp-admin/edit.php3.50 ▲0.1451.05 ▼0.48
Add New Post /wp-admin/post-new.php5.97 ▲0.0899.72 ▼1.44
Media Library /wp-admin/upload.php3.31 ▲0.0838.43 ▲5.27

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: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sitestream
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.81 ▼0.468.72 ▲7.0137.76 ▼7.79
Dashboard /wp-admin2,211 ▲435.64 ▲0.1292.19 ▼4.5839.45 ▼4.89
Posts /wp-admin/edit.php2,116 ▲161.96 ▼0.0636.39 ▼1.8334.75 ▼1.19
Add New Post /wp-admin/post-new.php1,539 ▲1123.08 ▲0.05656.40 ▼31.6751.28 ▼2.20
Media Library /wp-admin/upload.php1,416 ▲134.19 ▲0.0197.32 ▼10.5543.44 ▼5.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/greenweb/public/partials/greenweb-public-display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function greenweb_globals\\get_option() in wp-content/plugins/greenweb/greenweb_globals.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/greenweb/admin/partials/admin-display.php:19

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "rhymesthlm.se"
You can take inspiration from this readme.txt

greenweb/sitestream.php 85% from 13 tests

The primary PHP file in "Sitestream" version 1.1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("greenweb.php" instead of "sitestream.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin400 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13151505346
JavaScript27154

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.62
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin