90% siara-shield

Code Review | SiaraShield

WordPress plugin SiaraShield scored 90% from 54 tests.

About plugin

  • Plugin page: siara-shield
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2020
  • Latest release: Oct 14, 2022
  • Number of updates: 67
  • Update frequency: every 14.2 days
  • Top authors: siarashield (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.56ms] Passed 4 tests

This is a short check of server-side resources used by SiaraShield
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0949.33 ▲6.20
Dashboard /wp-admin3.39 ▲0.0863.85 ▲9.01
Posts /wp-admin/edit.php3.44 ▲0.0853.50 ▼7.84
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.51 ▼33.62
Media Library /wp-admin/upload.php3.31 ▲0.0843.53 ▲10.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SiaraShield
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22313.96 ▼0.3911.85 ▲9.4363.55 ▲15.54
Dashboard /wp-admin2,225 ▲375.85 ▼0.01133.50 ▲22.8248.08 ▲3.67
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0239.62 ▼6.7937.25 ▼3.75
Add New Post /wp-admin/post-new.php1,546 ▲3223.17 ▲5.58719.25 ▼89.4664.23 ▼1.28
Media Library /wp-admin/upload.php1,401 ▲164.21 ▼0.00135.58 ▲27.8255.23 ▲10.78

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
1 plugin tags: siarashield

siara-shield/siarashield.php 92% from 13 tests

"SiaraShield" version 3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("siara-shield.php" instead of "siarashield.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin641 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19487617
JavaScript17123
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/trash.png0.57KB0.42KB▼ 26.37%
images/plus.png0.91KB0.83KB▼ 8.59%