89% sakura-network

Code Review | Sakura Network

WordPress plugin Sakura Network scored89%from 54 tests.

About plugin

  • Plugin page: sakura-network
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.6
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Nov 4, 2021
  • Number of updates: 25
  • Update frequency: every 9.6 days
  • Top authors: justbeco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /629 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.08MB] [CPU: ▼14.12ms] Passed 4 tests

Server-side resources used by Sakura Network
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2039.72 ▼0.05
Dashboard /wp-admin3.51 ▲0.1649.82 ▼13.36
Posts /wp-admin/edit.php3.62 ▲0.2643.70 ▼2.61
Add New Post /wp-admin/post-new.php5.02 ▼0.8755.28 ▼39.46
Media Library /wp-admin/upload.php3.43 ▲0.2033.49 ▼1.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_sakura_widget
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Sakura Network
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.48 ▲0.181.95 ▲0.1840.05 ▼6.96
Dashboard /wp-admin2,218 ▲304.87 ▼1.0396.64 ▼18.8538.57 ▼9.17
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0335.91 ▲0.3831.70 ▼5.18
Add New Post /wp-admin/post-new.php6,364 ▲4,83127.58 ▲4.35891.52 ▲215.3358.69 ▼1.98
Media Library /wp-admin/upload.php1,400 ▲124.24 ▼0.0298.61 ▲3.2141.70 ▼2.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_sakura_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: e-commerce, sales, woo commerce, shop, sell...

sakura-network/sakura.php 69% from 13 tests

This is the main PHP file of "Sakura Network" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "2.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("sakura-network.php" instead of "sakura.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin985 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2118174971
JavaScript312312
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity27.75
▷ Minimum class complexity9.00
▷ Maximum class complexity61.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods50
▷ Static methods24.00%
▷ Public methods4896.00%
▷ Protected methods00.00%
▷ Private methods24.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin