84% yasothon-blocks

Code Review | Yasothon

WordPress plugin Yasothon scored84%from 54 tests.

About plugin

  • Plugin page: yasothon-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Apr 18, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: malaratn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /876 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
Installer ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼12.61ms] Passed 4 tests

This is a short check of server-side resources used by Yasothon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.81 ▲2.43
Dashboard /wp-admin3.32 ▲0.0246.73 ▲0.16
Posts /wp-admin/edit.php3.37 ▲0.0248.86 ▲0.34
Add New Post /wp-admin/post-new.php4.62 ▼1.2746.17 ▼50.66
Media Library /wp-admin/upload.php3.24 ▲0.0233.34 ▼0.28

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Yasothon: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7514.48 ▲0.192.05 ▲0.1042.89 ▼0.91
Dashboard /wp-admin2,209 ▲214.85 ▼0.02110.27 ▼1.5739.24 ▲1.83
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.13 ▼2.4735.06 ▲1.09
Add New Post /wp-admin/post-new.php6,587 ▲5,05122.73 ▼0.44934.42 ▲266.2770.10 ▲16.04
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0394.22 ▼8.5443.22 ▼1.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/post-style-4/index.php:223
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/posts-text-inner/index.php:213
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/posts/index.php:271
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/post-style-3/index.php:223
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/featured-posts/index.php:247
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/posts-list-sidebar/index.php:177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/post-style-2/index.php:224
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yasothon-blocks/src/blocks/post-style-1/index.php:223

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: editor, blog, news, magazine, block

yasothon-blocks/plugin.php 85% from 13 tests

"Yasothon" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yasothon-blocks.php" instead of "plugin.php")

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
No dangerous file extensions were detected14,742 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,024
Sass111,02353,927
JavaScript234031242,111
PHP104262321,610
SVG60060
CSS20010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin