84% pareto-security

Code Review | Pareto Security

WordPress plugin Pareto Security scored84%from 54 tests.

About plugin

  • Plugin page: pareto-security
  • Plugin version: 3.2.8
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Oct 19, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

20 reviews

Install metrics

500+ active /35,232 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.91MB] [CPU: ▲1.28ms] Passed 4 tests

Server-side resources used by Pareto Security
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.40 ▲0.9449.10 ▲12.23
Dashboard /wp-admin4.23 ▲0.8856.52 ▼1.79
Posts /wp-admin/edit.php4.28 ▲0.9253.65 ▲6.39
Add New Post /wp-admin/post-new.php6.81 ▲0.9288.92 ▼9.81
Media Library /wp-admin/upload.php4.15 ▲0.9245.02 ▲10.32
Pareto Security Dashboard /wp-admin/options-general.php?page=pareto_security_settings4.1339.18

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
pareto_security_log_list
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
pareto_security_settings_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pareto Security
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.33 ▼0.021.81 ▲0.1942.97 ▲6.26
Dashboard /wp-admin2,198 ▲175.55 ▼0.2083.65 ▼17.4876.15 ▲29.33
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0535.20 ▼4.0033.20 ▼3.07
Add New Post /wp-admin/post-new.php1,553 ▲2723.18 ▼0.56612.59 ▼78.40155.42 ▲93.77
Media Library /wp-admin/upload.php1,418 ▲184.13 ▼0.1494.44 ▼10.6477.23 ▲32.90
Pareto Security Dashboard /wp-admin/options-general.php?page=pareto_security_settings1,5152.2439.2354.10

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • pareto_security_ip_flood_list
    • theysaidso_admin_options
    • pareto_security_settings_options
    • pareto_security_log_list
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined method pareto_functions::send444() in wp-content/plugins/pareto-security/uninstall.php:8

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 28 tag instead of maximum 10
The official readme.txt is a good inspiration

pareto-security/pareto_security.php 92% from 13 tests

The primary PHP file in "Pareto Security" version 3.2.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pareto-security.php" instead of "pareto_security.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,937 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP82081,2873,750
CSS112144
JavaScript10027
XML20016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity224.40
▷ Minimum class complexity1.00
▷ Maximum class complexity902.00
Average method complexity7.73
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods166
▷ Static methods63.61%
▷ Public methods15593.37%
▷ Protected methods42.41%
▷ Private methods74.22%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants763.64%
▷ Class constants436.36%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
img/icon16bw.png0.32KB0.25KB▼ 21.36%
img/icon.png1.97KB1.69KB▼ 14.00%
img/icon16.png0.39KB0.32KB▼ 17.62%