84% create-stellar-toml

Code Review | Create Stellar Toml

WordPress plugin Create Stellar Toml scored84%from 54 tests.

About plugin

  • Plugin page: create-stellar-toml
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.3
  • WordPress version: 6.3.1
  • First release: Dec 12, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: esecamalich (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /701 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.18ms] Passed 4 tests

Analyzing server-side resources used by Create Stellar Toml
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.70 ▲3.12
Dashboard /wp-admin3.32 ▲0.0243.73 ▼1.85
Posts /wp-admin/edit.php3.38 ▲0.0249.65 ▲3.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.58 ▼2.83
Media Library /wp-admin/upload.php3.25 ▲0.0235.31 ▲0.84
Create Stellar Toml /wp-admin/options-general.php?page=well-known-admin3.2131.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Create Stellar Toml: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.55 ▼0.831.78 ▲0.2442.58 ▼1.06
Dashboard /wp-admin2,207 ▲155.88 ▲0.95106.24 ▼1.3843.11 ▲0.44
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0840.03 ▲3.4734.74 ▲0.07
Add New Post /wp-admin/post-new.php1,517 ▲317.54 ▲0.05651.81 ▼17.1948.26 ▼0.59
Media Library /wp-admin/upload.php1,392 ▲104.23 ▼0.0197.61 ▼2.4441.73 ▲1.15
Create Stellar Toml /wp-admin/options-general.php?page=well-known-admin7952.0524.4125.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 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 add_filter() in wp-content/plugins/create-stellar-toml/plugin.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: toml, well-known, well-known-uris, stellar

create-stellar-toml/plugin.php 92% from 13 tests

The entry point to "Create Stellar Toml" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("create-stellar-toml.php" instead of "plugin.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 plugin225 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16247225

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.50
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods426.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
stellar_icon_300px.png4.28KB2.29KB▼ 46.62%