78% xo-security

Code Review | XO Security

WordPress plugin XO Security scored78%from 54 tests.

About plugin

  • Plugin page: xo-security
  • Plugin version: 3.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 18, 2016
  • Latest release: Oct 27, 2023
  • Number of updates: 191
  • Update frequency: every 14.9 days
  • Top authors: ishitaka (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /152,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.54MB] [CPU: ▲0.39ms] Passed 4 tests

An overview of server-side resources used by XO Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.56 ▲0.99
Dashboard /wp-admin4.00 ▲0.6947.33 ▼6.06
Posts /wp-admin/edit.php4.05 ▲0.6949.82 ▲1.96
Add New Post /wp-admin/post-new.php6.51 ▲0.6295.67 ▲10.73
Media Library /wp-admin/upload.php3.86 ▲0.6239.50 ▲4.68
XO Security /wp-admin/options-general.php?page=xo-security-settings3.8335.42
Login log /wp-admin/users.php?page=xo-security-login-log3.8438.01

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 21 new files
Database: 1 new table, 7 new options
New tables
wp_xo_security_loginlog
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
xo_security_options

Browser metrics Passed 4 tests

Checking browser requirements for XO Security
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10214.75 ▲0.571.70 ▲0.0343.44 ▼0.31
Dashboard /wp-admin2,272 ▲985.72 ▲0.1891.64 ▼8.6841.75 ▲1.35
Posts /wp-admin/edit.php2,110 ▲72.02 ▲0.0536.49 ▼4.2037.66 ▼2.75
Add New Post /wp-admin/post-new.php1,548 ▲2018.26 ▼4.98625.47 ▼31.3369.81 ▲13.68
Media Library /wp-admin/upload.php1,410 ▲104.17 ▼0.0396.35 ▼1.4942.17 ▼4.23
XO Security /wp-admin/options-general.php?page=xo-security-settings1,1712.0423.5328.65
Login log /wp-admin/users.php?page=xo-security-login-log1,2612.0526.1831.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/xo-security/captcha/captcha.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/xo-security/inc/class-xo-login-log-list-table.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/xo-security/inc/class-xo-login-log-list-table.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/xo-security/inc/class-xo-login-log-list-table.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
5 plugin tags: login, xmlrpc, rest, pingback, security

xo-security/xo-security.php 92% from 13 tests

"XO Security" version 3.7.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,604 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP53997672,256
CSS21412211
JavaScript2131137

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity171.00
▷ Minimum class complexity29.00
▷ Maximum class complexity271.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods138
▷ Static methods53.62%
▷ Public methods11986.23%
▷ Protected methods64.35%
▷ Private methods139.42%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/check-off.png0.45KB0.25KB▼ 43.91%
images/check-on.png0.93KB0.62KB▼ 33.12%
images/check-ng.png1.14KB0.74KB▼ 35.53%