89% small-wp-security

Code Review | Small WP Security - SP SWS

WordPress plugin Small WP Security - SP SWS scored89%from 54 tests.

About plugin

  • Plugin page: small-wp-security
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 1, 2018
  • Latest release: Aug 21, 2018
  • Number of updates: 8
  • Update frequency: every 21.6 days
  • Top authors: spoot1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.91ms] Passed 4 tests

Analyzing server-side resources used by Small WP Security - SP SWS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.85 ▲0.58
Dashboard /wp-admin3.33 ▲0.0343.14 ▼3.25
Posts /wp-admin/edit.php3.39 ▲0.0341.33 ▼4.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.78 ▼15.52
Media Library /wp-admin/upload.php3.26 ▲0.0330.50 ▼4.17
Small WP Security /wp-admin/options-general.php?page=sp_wp_security3.2228.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 12 new options
New WordPress options
sp_wp_security_comments
db_upgraded
sp_wp_security_link_meta
sp_wp_security_security_header
widget_theysaidso_widget
sp_wp_security_wp_version
theysaidso_admin_options
widget_recent-posts
sp_wp_security_emojis
can_compress_scripts
...

Browser metrics Passed 4 tests

Small WP Security - SP SWS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.27 ▼0.994.57 ▲2.6139.12 ▼5.46
Dashboard /wp-admin2,210 ▲225.85 ▲0.9499.95 ▼10.7040.89 ▲1.85
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0237.15 ▼1.8634.36 ▲0.76
Add New Post /wp-admin/post-new.php1,545 ▲318.42 ▲0.12629.57 ▲5.7371.46 ▲7.42
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0295.97 ▲1.0944.13 ▲1.85
Small WP Security /wp-admin/options-general.php?page=sp_wp_security9972.0425.4553.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Settings 01), #2 (Settings 02), #3 (Settings 03)
You can take inspiration from this readme.txt

small-wp-security/sp-wp-security.php 85% from 13 tests

The principal PHP file in "Small WP Security - SP SWS" v. 1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("small-wp-security.php" instead of "sp-wp-security.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin5,476 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS211132,387
PHP65463290
PO File245117128

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png67.53KB23.85KB▼ 64.68%
screenshot-3.png8.76KB3.89KB▼ 55.57%
screenshot-2.png51.38KB17.88KB▼ 65.20%