84% starscape

Code Review | Starscape Block

WordPress plugin Starscape Block scored84%from 54 tests.

About plugin

  • Plugin page: starscape
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2020
  • Latest release: Jul 28, 2023
  • Number of updates: 13
  • Update frequency: every 98.5 days
  • Top authors: ajlende (92.31%)oskosk (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,392 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.83ms] Passed 4 tests

A check of server-side resources used by Starscape Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.21 ▼6.61
Dashboard /wp-admin3.32 ▼0.0348.53 ▼15.11
Posts /wp-admin/edit.php3.37 ▲0.0151.54 ▲3.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.82 ▲1.37
Media Library /wp-admin/upload.php3.25 ▲0.0136.90 ▲1.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Starscape Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲5614.35 ▼0.361.65 ▼0.2541.62 ▼9.91
Dashboard /wp-admin2,195 ▲185.63 ▲0.0387.27 ▲0.0642.77 ▲3.37
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0236.94 ▲1.6634.02 ▼4.10
Add New Post /wp-admin/post-new.php1,538 ▲923.01 ▼0.00645.04 ▼54.7049.46 ▼3.84
Media Library /wp-admin/upload.php1,394 ▼04.23 ▲0.0196.78 ▼5.3144.06 ▼3.66

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 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\A8c\\Plugins\\Blocks\\Starscape\\add_action() in wp-content/plugins/starscape/blocks/starscape.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/starscape/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
2 plugin tags: blocks, block

starscape/index.php 92% from 13 tests

"Starscape Block" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("starscape.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin90 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3102441
CSS21239
JSON1009
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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
Namespaces1
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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG images were found in this plugin